a simple question that's frustrating me

C

Charlie

All of a sudden, my VBA code isn't working and I've tracked it down to the
right() and Left() functions. It's like VBA doesn't recognize these as
functions.
Here's a simple example that gives me an error:
Sub temp()
Dim stline As String
Debug.Print Right(stline, 1)

End Sub


It says 'Project or Library not found' and it highlights the word 'RIGHT'.
I've restarted my pc, but it didn't help. I'm using word 2003, windows xp.
This code used to run, and on this very same pc!
Please help,
thanks,
ck
 
J

Jonathan West

Charlie said:
All of a sudden, my VBA code isn't working and I've tracked it down to the
right() and Left() functions. It's like VBA doesn't recognize these as
functions.
Here's a simple example that gives me an error:
Sub temp()
Dim stline As String
Debug.Print Right(stline, 1)

End Sub


It says 'Project or Library not found' and it highlights the word 'RIGHT'.
I've restarted my pc, but it didn't help. I'm using word 2003, windows
xp.
This code used to run, and on this very same pc!


In the VBA editor, with the project open, go to Tools References. There will
probably be a reference set to a missing library. Either uncheck the
reference or fix it.
 

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