C
Conan Kelly
Hi all,
I'm trying to macros on a custom toolbar in a template. I created the
original file (Mileage Log.xls) with macros to hide & unhide 4 specific
columns. I also have buttons on a custom toolbar assigned to these macros.
So I cleared the data in the workbook and saved it as a template (Mileage
Log.xlt). When I create a new file based on Mileage Log.xlt, I get the
security message warning me about macros and I choose "Enable". If I
attempt to run the macros, I get the following message:
'Mileage Log1.xls' could not be found. Check the spelling of the file name,
and verify that the file location is correct.
If you are trying to open the file from your list of most recently used
files on the File menu, make sure that the file has not been renamed, moved,
or deleted.
When I go into "Customize..." (customize toolbars) and check the macros
assigned to the buttons, the path is 'C:\...\Mileage Log1'!HideColumns (or
'C:\...\Mileage Log1'!UnhideColumns). Since the new file based on Mileage
Log.xlt has not been saved as "Mileage Log1.xls" and the file does not
physically exist on disk, the macro can't be found.
If I save the file as "Mileage Log 8-1.xls", I get the same error: The path
of the macros assigned to the buttons on the custom toolbar still points to
"Mileage Log1".
Is there a way to get these macros to work without actually saving the file
"Mileage Log1.xls". Is there a way to get that path to automatically change
to the new file name when it is saved? Is there a way to get the macros to
work when a new file is created based on the template without first saving
it and giving it an official name?
Thank you for any help anyone can provide,
Conan Kelly
I'm trying to macros on a custom toolbar in a template. I created the
original file (Mileage Log.xls) with macros to hide & unhide 4 specific
columns. I also have buttons on a custom toolbar assigned to these macros.
So I cleared the data in the workbook and saved it as a template (Mileage
Log.xlt). When I create a new file based on Mileage Log.xlt, I get the
security message warning me about macros and I choose "Enable". If I
attempt to run the macros, I get the following message:
'Mileage Log1.xls' could not be found. Check the spelling of the file name,
and verify that the file location is correct.
If you are trying to open the file from your list of most recently used
files on the File menu, make sure that the file has not been renamed, moved,
or deleted.
When I go into "Customize..." (customize toolbars) and check the macros
assigned to the buttons, the path is 'C:\...\Mileage Log1'!HideColumns (or
'C:\...\Mileage Log1'!UnhideColumns). Since the new file based on Mileage
Log.xlt has not been saved as "Mileage Log1.xls" and the file does not
physically exist on disk, the macro can't be found.
If I save the file as "Mileage Log 8-1.xls", I get the same error: The path
of the macros assigned to the buttons on the custom toolbar still points to
"Mileage Log1".
Is there a way to get these macros to work without actually saving the file
"Mileage Log1.xls". Is there a way to get that path to automatically change
to the new file name when it is saved? Is there a way to get the macros to
work when a new file is created based on the template without first saving
it and giving it an official name?
Thank you for any help anyone can provide,
Conan Kelly