Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 18th, 2005, 12:22 PM
Registered User
 
Join Date: Jan 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Beg Access 2000 VBA - Ch 5 - pg 136 - Library?

I'm running an example that deals with 'Case', but it throws an error before it gets to the Case statement.

It cannot run the Left$ and Right$ functions which is part of the assignment statement. The error is "Compile Error: Can't find project or library". I've gone and double checked to see that "Visual Basic for Applications" is checked in the Tools-References option of the VBE. The code in the Ch5 Module works fine - and mine matches it word for word. What could be wrong here?
Reply With Quote
  #2 (permalink)  
Old January 18th, 2005, 05:36 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

I'd try the module in a new .mdb file. Every once and a while I have a code module that won't run a standard VBA library (Vbe6.dll) function, and its usually the case that my Access file is corrupt and not the library file.

If you continue to have problems with VBA functions, try browsing to the Vbe6.dll in the References dialog to rebuild the path information:

C:\Program Files\Common Files\Microsoft Shared\Vba\Vba6\Vbe6.dll

Otherwise, here's how you replace a corrupt Vbe6.dll file per MS:

Rename and Reinstall the Vbe6.dll File

For a corrupted, missing, or wrong version of the Vbe6.dll file, follow these steps.

NOTE: You need your Office CD-ROM to complete this task.
1. Quit all currently open programs.
2. Start an MS-DOS prompt in a window by doing one of the following:
• Microsoft Windows 95 or Windows 98:
Click Start, point to Programs, and then click MS-DOS Prompt.
• Microsoft Windows Millennium Edition (Me):
Click Start, point to Programs, point to Accessories, and then click MS-DOS Prompt.
• Microsoft Windows NT 4.0:
Click Start, point to Programs, and then click Command Prompt.
• Microsoft Windows 2000 or Microsoft Windows XP:
Click Start, point to Programs, point to Accessories, and then click Command Prompt.

3. To change the directory to the location of the Vbe6.dll file, type one of the following (including the quotation marks), and then press ENTER:
CD "C:\Program Files\Common Files\Microsoft Shared\Vba\Vba6"
-or-
CD progra~1\Common~1\Micros~1\Vba\Vba6
NOTE: This is the default directory for the Vbe6.dll file. If you installed Microsoft Office into another drive or directory, you must type its path.
4. To unregister the Vbe6.dll file, type the following.

In Windows 95, Windows 98, or Windows Me, type:
C:\Windows\System\REGSVR32 /U VBE6.DLL
In Windows NT 4.0, Windows 2000, or Windows XP, type:
REGSVR32 /U VBE6.DLL
-or-
C:\Winnt\System32\REGSVR32 /U VBE6.DLL
NOTE: This is the default directory for the Windows System directory. If you installed Windows into another directory, you must type its path.
5. In the MS-DOS prompt window, rename Vbe.dll to Vbe.old by typing the following and then pressing ENTER:
rename vbe6.dll vbe6.old
6. Quit the MS-DOS prompt window. To do this, do one of the following: • Type Exit at the command prompt, and then press ENTER. -or-


• Click Close (the X in the upper-right corner of the window).

7. Start Microsoft Access.
8. On the Tools menu, point to Macro, and then click VBA Editor.

The Windows Installer detects that the Vbe6.dll file is missing on the system, installs the file from the Office CD, and registers it again.


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Beg Access VBA 2000 - icre cream database Michele_Haywood Access VBA 1 December 6th, 2006 08:38 AM
beg access 2003 vba Michele_Haywood BOOK: Beginning Access VBA 0 November 9th, 2006 09:03 PM
beg access vba 2003 Michele_Haywood Access VBA 0 November 8th, 2006 10:15 PM
Beg Access 2002 VBA chap 6 Capitilzation cynwalker BOOK: Beginning Access VBA 1 December 26th, 2003 11:57 PM
Access 2000 VBA Ch 6 Reports form project Nelz BOOK: Beginning Access VBA 1 September 29th, 2003 09:51 AM



All times are GMT -4. The time now is 10:26 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.