Right now, I have a template file with macros in it. One of the macros runs all the other macros. The problem I am having is it will not work if I change the name of the file. The current template file code looks like this...
Application.Run "'Dashboard Template.xlsm'!OriginalDataFill"
Application.Run "'Dashboard Template.xlsm'!CreateCashFlow"
Application.Run "'Dashboard Template.xlsm'!CreatePOFlow"
Application.Run "'Dashboard Template.xlsm'!CreateLookAheads"
When I change the name of the file from "Dashboard Template," the macro will not work anymore. I tried the code below, but got an error message...
Application.Run ActiveWorkbook.Name & "!OriginalDataFill"
Application.Run ActiveWorkbook.Name & "!CreateCashFlow"
Application.Run ActiveWorkbook.Name & "!CreatePOFlow"
Application.Run ActiveWorkbook.Name & "!CreateLookAheads"
I get this error message... Run-time error 1004: Cannot run the macro 'Dashboard Template Test.xls,!OriginalDataFill". The macro may not be available in this workbook or all macros may be disabled.
Any thoughts? Thanks in advance...
Application.Run "'Dashboard Template.xlsm'!OriginalDataFill"
Application.Run "'Dashboard Template.xlsm'!CreateCashFlow"
Application.Run "'Dashboard Template.xlsm'!CreatePOFlow"
Application.Run "'Dashboard Template.xlsm'!CreateLookAheads"
When I change the name of the file from "Dashboard Template," the macro will not work anymore. I tried the code below, but got an error message...
Application.Run ActiveWorkbook.Name & "!OriginalDataFill"
Application.Run ActiveWorkbook.Name & "!CreateCashFlow"
Application.Run ActiveWorkbook.Name & "!CreatePOFlow"
Application.Run ActiveWorkbook.Name & "!CreateLookAheads"
I get this error message... Run-time error 1004: Cannot run the macro 'Dashboard Template Test.xls,!OriginalDataFill". The macro may not be available in this workbook or all macros may be disabled.
Any thoughts? Thanks in advance...