HELP: compile error message

  • Thread starter Thread starter KevinGPO
  • Start date Start date
K

KevinGPO

This is referring to the Office Excel VB. Excel VB claims it is just like
VB.

I am wondering where on the internet how I can find out whether a function
existed for a particular version of Office Excel VB?

For example, I am using Office 2003 but my clients are using Office 95, or
97. Am wondering whether the string function Left() & Right() existed in
Office 95/97 Excel VB? If so, then does anyone have any ideas why VB threw a
"Compile error: Can't find project or library" and it highlights Left(
function line?
 
Hi Kevin,

With the workbook in question active, run the problematic code

When the code errors, go to the VBE and select the project in the Project
Explorer window

Hit the reset button and look at the Tools | References list

Look for any references marked as "MISSING".

Either uncheck the reference or, if the reference is needed, try the browse
button to locate the library,
 
Hi, Norman,
Still, there must be something rotten in what Kevin has disclosed. I work
with my rather sizeable project on different computers with different XLs
implemented, but all of them 2k and higher. Sometimes, though rarely, when
shifting computers with a programm debugged at another place, the compiler
announces exactly the same error, invariably at one of the three string
functions: Right($ - makes no difference), Left, Mid. After a while of
patience (closing and opening XL several times) the it gets sensible.
Strange, why just these old and ubiquitous functions are so touchy?
Petr
 
Hi Petr,

I do not know why one function rather than another is highlighted in the
event of a missing reference.

Rather than your suggestion of repeatedly closing and reopening Excel,
others have suggested that qualifying the function with the application
object helps.

I believe in cures rather than palliatives, however, and I would, therefore,
advocate that a broken reference should either be located or deleted.

Of course, in the absence of a response from Kevin, it is not possible to
confirm the original diagnosis.
 
Back
Top