Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Compile error ...
Hi,
I am getting the error Compile error! "Cannot find project or library" for the following code in excel. The error is thrown for functions such as chr(), mid(), ucase() etc. ---------------------------------------------------------------------------- ---------------------- '---- Username = Left(lpBuff, InStr(lpBuff, Chr(0)) - 1) Username = "" For i = 1 To Len(lpBuff) If Asc(Mid(lpBuff, i, 1)) 0 Then Username = Username & Mid(lpBuff, i, 1) Next ---------------------------------------------------------------------------- ---------------------- Any help would be highly appreciated. TIA, Gary |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Compile error ...
Hi Gary,
Choose Tools/References from the VBE menu and you should see one of the selected references for your project prefixed with "MISSING". Uncheck this reference and this problem should go away (although other problems may arise as a result of the missing reference). -- Rob Bovey, MCSE, MCSD, Excel MVP Application Professionals http://www.appspro.com/ * Please post all replies to this newsgroup * * I delete all unsolicited e-mail responses * "Gary" wrote in message ... Hi, I am getting the error Compile error! "Cannot find project or library" for the following code in excel. The error is thrown for functions such as chr(), mid(), ucase() etc. -------------------------------------------------------------------------- -- ---------------------- '---- Username = Left(lpBuff, InStr(lpBuff, Chr(0)) - 1) Username = "" For i = 1 To Len(lpBuff) If Asc(Mid(lpBuff, i, 1)) 0 Then Username = Username & Mid(lpBuff, i, 1) Next -------------------------------------------------------------------------- -- ---------------------- Any help would be highly appreciated. TIA, Gary |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Compile error ...
Hi,
In the VBE, check Tools, references. See if any are noted as missing. Try to uncheck those. Other option: Export and remove the module. Then import it again. Regards, Jan Karel Pieterse Excel TA/MVP -----Original Message----- Hi, I am getting the error Compile error! "Cannot find project or library" for the following code in excel. The error is thrown for functions such as chr(), mid(), ucase() etc. ---------------------------------------------------------- ------------------ ---------------------- '---- Username = Left(lpBuff, InStr(lpBuff, Chr(0)) - 1) Username = "" For i = 1 To Len(lpBuff) If Asc(Mid(lpBuff, i, 1)) 0 Then Username = Username & Mid(lpBuff, i, 1) Next ---------------------------------------------------------- ------------------ ---------------------- Any help would be highly appreciated. TIA, Gary . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Compile error ...
Thank you so much, problem solved.
- Gary "Gary" wrote in message ... Hi, I am getting the error Compile error! "Cannot find project or library" for the following code in excel. The error is thrown for functions such as chr(), mid(), ucase() etc. -------------------------------------------------------------------------- -- ---------------------- '---- Username = Left(lpBuff, InStr(lpBuff, Chr(0)) - 1) Username = "" For i = 1 To Len(lpBuff) If Asc(Mid(lpBuff, i, 1)) 0 Then Username = Username & Mid(lpBuff, i, 1) Next -------------------------------------------------------------------------- -- ---------------------- Any help would be highly appreciated. TIA, Gary |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Solver - error - Compile Error | Excel Discussion (Misc queries) | |||
help with this error-Compile error: cant find project or library | Excel Discussion (Misc queries) | |||
VBA Error Message "Compile Error...." | Excel Discussion (Misc queries) | |||
How do I get rid of "Compile error in hidden module" error message | Excel Discussion (Misc queries) |