View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Changing Macro Name?

You can't. The macro is contained in the file, so it is part of the
identification.

If you want to rename the file, open it in excel and rename it by doing a
file saveas.

--
Regards,
Tom Ogilvy

"Mike" wrote in message
ups.com...
Hi everyone,

Say I created a macro I named "Base" in a an excel workbook named
ABC.xls

Later, say I changed the file name to DEF.xls

Now, when I click on the macro button to execute, I get "out of range"
error and the file close!

How can I make the macro name is independent of the file name; so it
doesn't keep referring to the old file name?

Regards,
Mike