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!

How can I find an old macro which seems to be hidden? 1

Status
Not open for further replies.

Beeble

Programmer
Jun 12, 2001
7
GB
When I open an excel template and look in the 'macros' there are two of them but trying to edit either gives a
'Reference is not valid' msgbox and I can't get at the code.
The macros were written in about 1997.
Can anyone suggest how I might be able to access the code?

Once I can do this I can then try to activate them from a VB program.
Thanks (in hope)

 
Are they in your file or in Excel?

When you hit Alt-F11, are they in a module?

You may be able to copy the sheets to a new workbook.
techsupportgirl@home.com
Brainbench MVP for Microsoft Word
 
The macros are (I think) in the template in that if I simply double click it to open it in Excel and then do Tools/Macros there they are named. However, clicking them gives the error and Alt/F11 or just going into the VBA editor shows no sign of any module!
It seems that excel is somewhat confused about what it's got.
Copying the sheets transfers the macro names but apparently no code.
In the macro dialog box when I select one of the macros the edit button is enabled but the delete button is not!!
 
Sounds like you downloaded this from someone who doesn't want you to see the code/how it works.

You MIGHT want to try (dunno if it will work) opening the file from Word. Hit File-Open and change the file type to "recover text from any file". This MAY (I didn't try it) let you at least see the code somewhere amid all the other junk.
techsupportgirl@home.com
Brainbench MVP for Microsoft Word
 
I think the code got lost at some point in the template's history. I did try opening it in Word. Certainly interesting but nothing I could use.
Ah well, ce la vie. It looks as if the macro isn't doing what the user thinks it is anyway so it'll probably have to be rewritten.

Thanks for your help anyway.

Beeble
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top