Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SOS!! Error message in Excel 2000 - can't find project or library?

Status
Not open for further replies.
Aug 2, 2000
325
US
This code works fine on my PC with Excel 2000 and USED to work on others PC, but as of today it stopped working on the other PC's (also with XL2000) and produced this "Can't find Project or Library"

Sheets("EscalationMain").Select
ActiveSheet.Copy Before:=Worksheets("EscalationMain")

ActiveSheet.Name = Format(Now, "MMDDYYhhmmss")


The error occurs and breaks on the ActiveSheet.Name line.


Basically all that it does is copy the Sheet called 'EscalationMain' and names the new sheet whatever the current date and time is. ...Oh yeah, it breaks on the word 'Format'.

Thanks in advance,
Dave
 
Strange. First split the line in two, to see where the error occurs:

sSheet=Format(Now, "MMDDYYhhmmss")
activesheet.name=sSheet

That will help narrow down the problem.
Rob
[flowerface]
 
Okay, what happens if you precede the line with format with a simple

msgbox now

(to see if it's the now or the format that's causing the problem)
Rob
[flowerface]
 
I'm sorry, but I don't understand the relevance of your suggestion.
 
i have had similar problems b4 in Access using the Date() function. If u goto a code window, then Tools and References, you may find a MISSING reference. If so, uncheck it. Nick (Everton Rool OK!)
 
You have a line of code with a problem. VB isn't very good at telling you exactly WHERE in the line of code the problem is, so it often helps to split the line out until you find exactly where the error occurs.
Rob
[flowerface]
 
NickJar2

Thanks. As It turns out that was the exact issue.
There was a reference in it for a Crescent Form ?? or something like that. How goofy.
But Everything is groovy.

Thanks again,
Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top