ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Compiler Error (https://www.excelbanter.com/excel-discussion-misc-queries/165397-compiler-error.html)

Bobzter100

Compiler Error
 
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

Dave Peterson

Compiler Error
 
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.

Bobzter100 wrote:

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


--

Dave Peterson

Bobzter100

Compiler Error
 
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

"Dave Peterson" wrote:

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.

Bobzter100 wrote:

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


--

Dave Peterson


Dave Peterson

Compiler Error
 
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?

Bobzter100 wrote:

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

"Dave Peterson" wrote:

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.

Bobzter100 wrote:

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


--

Dave Peterson


--

Dave Peterson

Bobzter100

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

"Bobzter100" wrote:

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



All times are GMT +1. The time now is 04:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com