Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot Find Library

Status
Not open for further replies.

MacroMike

Programmer
May 23, 2007
5
US
I developed an application in VBA for office 2003. I tested and sent it to a client. Works fine on my machine but compiling or running it on their machine give the error "Cannot Find Library". It then highlights the function LCase$. I tried using LCase$ in the immediate window and it gives me the same error. I open the object browser (F2) and browse VBA. The String library shows as does LCase$ and LCase. I tried using a number of the functions in the string library (Left$, Right$, Mid$, etc.) and they all give me the same error. The client had installed Office 2007 so we moved over to another machine that had 2003. Same problem. Other functions and statements execute but none of the string functions. I've never seen the likes. Any ideas?
 
Double check the references: menu Tools -> References ...

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks for the response. Yes, I checked the references and VBA is the first one in the list. The dll's on the client computers are newer than the one on mine but that doesn't explain why the LCase$ function isn't available. It shows in the object browser under VBA on the client computers but the VBA IDE can't find it. It's very wierd.
 
No missing reference in the client computer ?
You didn't use an exotic OCX or alike ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Nothing exotic. As a matter of fact, it's the dll that is automatically checked in the references when you open VBA. What has me puzzled is that the problem is the same on both computers. One has Office 2007 and the other 2003. I developed it on 2003. The other thing that I think is so strange is that even in the VBA IDE immediate window, it doesn't recognize common VBA functions. Yet, the object browser shows those functions as part of the VBA dll that is referenced in the project.
 
Are there any reference libraries missing but still checked?

I had the exact same problem and it was a missing library that had nothing to do with the missing functions, but I removed the check by the "MISSING:" library and everything worked just fine. Just be sure that there if there is any library that is "MISSING" to remove the checkbox by that library under references. Good luck.
 
noviceSoFar: thanks for the comments. I have had that very problem in other software. Unfortunately, none of the references show missing in this application. I'm sure it's going to be something simple. What isn't so simple is finding out what it is.
 
is the list of references when opened on your computer the same as when opened on the client's computer?

Also, does it highlight anything when you compile your code?

Cheers,

Roel
 
The list is identical to my computer. I have looked at the versions of the VBA.dll and they are different on the client computers.

There is a class in the normal.dot file that I beleive is being blocked by security settings. I have them set as low as possible on the client computers but I'm pretty sure it's being blocked. Could this be the problem?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top