Compiler Error

B

Bobzter100

Hi
I made some macros that enable me to rename a tab (excel) depending what
date and time it is. I then run another to save the file by the tab name -
all works great on the computer i wrote the file on.
When i transfer the file to a friends computer i get the the visual basic
error..."Compiler Error Can't find project or library".
I did amend the original macro by formatting the date and time in the
form... format(date,"dd,mm,yy") and format(time,"hh,mm") and it is at these
two statemants that I receive the error. We both run excel 2002 sp2 and the
same error comes up on another computer that's running excel 2003 sp2.
Any help?
Bobzter
 
D

Dave Peterson

With that project active, click on Tools|References.

Look for a reference marked MISSING. You'll have to decide if you need to
replace it or just uncheck it.

The line marked in error may not (will probably not!) have anything to do with
the missing reference.
 
B

Bobzter100

Hi Dave - Many thanks. I located a reference marked "missing", unchecked it
and cleared the error!
However - I now have another error coming up. I use some error checking to
get the new file name to ensure the characters are legal and i am receiving
an error at the "validatefilename" statement. I can't find any other
"missing" references. Any help is welcomed. As before - this code works well
on the design computer and I can't see any differences between the
reference's.
Regards
Bobzter
 
D

Dave Peterson

What's "validatefilename"?

Is is a subroutine/function? Is it in a different workbook's project? Did you
share that other workbook with your friend?
 
B

Bobzter100

Hi Dave
Sorry - ValidateFilename is a routine that i hadn't included! Your solution
is tops, many thanks
Bobzter
 

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