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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA Excel97 Worksheet Copy

Status
Not open for further replies.

hsummer

Technical User
Dec 10, 2001
13
US
I wrote a VBA app in Excel2000 that I want to use in Excel97. Upon reaching Worksheets("temp").Copy an error is generated that says the method is invalid.

I also noticed that when I do Worksheets. without anything after the dot, I am prompted with a list of possibilities, but if I add the ("temp") then I get no options - as if the object is not defined.

Yes, "temp" is a valid worksheet name.

Any ideas?

Harold
 
Hi hsummer,

I have had the exact same problem with Excel97 and Excel2000. But you are in luck. The problem is when you run the VBA app in Excel2000, the object libraries change. To fix it, put excel into design mode, then open up the VB Editor Go to Tools, and then References. Under here you may see a check box that is checked entitled "MISSING: and some object library", usually it is usually a version number of 9.0. All you have to so is uncheck this box and change the library to the older version number. Excel2000 is smart enough to automatically change the library itself, but Excel97 isn't. Let me know if this helps.

dawa1234
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top