Hi,
I am trying to save a workbook after macro has run as .xlsx so that same file can be sent to users without macro, but if I use below code it throws error
[code]
Dim ThisFile As String
ThisFile = "Regulatory Reporting " & Format(Range("G21").Value, "dd.MMM") & ".xlsx"
MsgBox ThisFile
ActiveWorkbook.SaveAs Filename:=ThisFile
[\code]
and if changed as below (.xlsm) then it works without any trouble
[code]
Dim ThisFile As String
ThisFile = "Regulatory Reporting " & Format(Range("G21").Value, "dd.MMM") & ".xlsm"
MsgBox ThisFile
ActiveWorkbook.SaveAs Filename:=ThisFile
[\code]
Any Idea how can I change the file type ?
Bookmarks