Hi everyone
I'm a relative novice at VBA coding and can use some assistance. I have a template file (saved as xltm) that i want to save as an "xlsm" file with the file name referenced to cell "G1".
This is the code that I wrote but i have a 1004 error appearing for the "method "SaveAs" of object "_workbook" failed
Sub Save_File()
Dim FileName As String
Dim Path As String
Application.DisplayAlerts = False
Path = "G:\RT SEQ RMC\SUNSHINE COAST\02. ADMINISTRATION\RMC Weekly Claims\Testing\"
FileName = Range("G1").Value & ".xlsm"
ActiveWorkbook.SaveAs Path & FileName, xlOpenXMLWorkbookMacroEnabled
Application.DisplayAlerts = True
ActiveWorkbook.Close
End Sub
I am using Office 365.
Any advice?
Thanks
I'm a relative novice at VBA coding and can use some assistance. I have a template file (saved as xltm) that i want to save as an "xlsm" file with the file name referenced to cell "G1".
This is the code that I wrote but i have a 1004 error appearing for the "method "SaveAs" of object "_workbook" failed
Sub Save_File()
Dim FileName As String
Dim Path As String
Application.DisplayAlerts = False
Path = "G:\RT SEQ RMC\SUNSHINE COAST\02. ADMINISTRATION\RMC Weekly Claims\Testing\"
FileName = Range("G1").Value & ".xlsm"
ActiveWorkbook.SaveAs Path & FileName, xlOpenXMLWorkbookMacroEnabled
Application.DisplayAlerts = True
ActiveWorkbook.Close
End Sub
I am using Office 365.
Any advice?
Thanks