Jake read your post differently from me - and after rereading your post,
perhaps he is correct.
I saw button and thought you had assigned the macro to a command button or
other type of button.
So my comments would only be appropriate in that context.
--
Regards,
Tom Ogilvy
"Tom Ogilvy" <twogilvy@msn.com> wrote in message
news:epG7gtwAFHA.1188@tk2msftngp13.phx.gbl...
> 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" <mas_it_2000@yahoo.com> wrote in message
> news:1106674847.942020.79990@z14g2000cwz.googlegroups.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
> >
>
>
Bookmarks