J
jmdaniel
Why can't I rename a file that has macros in it, then change all references
in the code to the new file name, and get the macro to work? A snippet of my
code:
Windows("nih_payment").Activate
ActiveWorkbook.Close
Application.DisplayAlerts = True
Windows("NIH NonProduction Spend Macro.xls").Activate
Application.Run "NIH NonProduction Spend Macro.xls!Macro1"
Range("A1").Select
Selection.AutoFilter
The macro was built by a summer intern, who was short on imagination, so I
replaced his name for the file, "Macro2", with a more descriptive one, "NIH
NonProduction Spend Macro". The only bad thing is that this macro now will
only run if it is run by itself, not called out in the midst of another
macro. If I try to do the latter, all I get is the error message:
The macro 'NIH NonProduction Spend Macro.xls!'Macro1' cannot be found.
There are no Links to reset; that action is grayed out. Kind of a head
scratcher...
in the code to the new file name, and get the macro to work? A snippet of my
code:
Windows("nih_payment").Activate
ActiveWorkbook.Close
Application.DisplayAlerts = True
Windows("NIH NonProduction Spend Macro.xls").Activate
Application.Run "NIH NonProduction Spend Macro.xls!Macro1"
Range("A1").Select
Selection.AutoFilter
The macro was built by a summer intern, who was short on imagination, so I
replaced his name for the file, "Macro2", with a more descriptive one, "NIH
NonProduction Spend Macro". The only bad thing is that this macro now will
only run if it is run by itself, not called out in the midst of another
macro. If I try to do the latter, all I get is the error message:
The macro 'NIH NonProduction Spend Macro.xls!'Macro1' cannot be found.
There are no Links to reset; that action is grayed out. Kind of a head
scratcher...