Hi All,
I have a template which is Macro Enabled ending with .xltm
Through VBA (in a macro), I am attempting to save the template as an ordinary file with a new name. The file is currently defined as the Active Workbook and I am using the following command:-
I have also tried using the following command:-
I get a run-time error 1004.
Please note
Where am I going wrong? I am a newbie to VBA so please be gentle.
I have a template which is Macro Enabled ending with .xltm
Through VBA (in a macro), I am attempting to save the template as an ordinary file with a new name. The file is currently defined as the Active Workbook and I am using the following command:-
VBA Code:
ActiveWorkbook.SaveAs fPath & ".xlsx", 51.
I have also tried using the following command:-
VBA Code:
ActiveWorkbook.SaveAs Filename:=fPath & ActiveWorkbook.Name&".xlsx", FileFormat:=xlOpenXMLWorkbook
I get a run-time error 1004.
Please note
VBA Code:
fPath is defined as Dim fPath As String, fPath = ThisWorkbook.Path & "\"
Where am I going wrong? I am a newbie to VBA so please be gentle.