Urgent! VBA complier can't recognize function such as left(), righ

D

doniy

Hello,

today I opened my MS-project, and run a Micro which runs well before.
I got a error message:
Compile error:
Can't find project or library.

and the code window is opened, the fuction Left(....) is highted.
then I tried some other function like mid(), right(), I got the same error.

What is the problem, who to solve it?

thanks in advance.
 
J

JackD

Looks like you are missing the reference to the "Visual Basic for
Applications"
Hit ALT+F11 to open the Visual Basic Editor, then look at tools/references
and see what is checked.
Those functions are in the VBA library.

-Jack Dahlgren
 
D

doniy

Thanks JackD.
You lead me to the right place - references, "Visual Basic for Applications"
is checked, but I found a item "missing ....", it's something from SAP, I
don't know why it is there, so I just unchecked it.
now the micro runs.

thanks again.
 
J

JackD

Glad to be of help.

-Jack Dahlgren
doniy said:
Thanks JackD.
You lead me to the right place - references, "Visual Basic for
Applications"
is checked, but I found a item "missing ....", it's something from SAP, I
don't know why it is there, so I just unchecked it.
now the micro runs.

thanks again.
 
S

Steve Goodhall

What frequently happens in VBA is that if any reference is broken, the
compiler will stop there and will not look beyond that reference for
functions in other dll's. The most frequent symptom is exactly what you see,
a failure on something basic like mid() or right().
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top