Hi,
I'm trying to make an my excel macro to save the file with a new name at the end of the script. The script saves the file but not in excel macro enabled format. Could you help me to correct it so that it would save my file as .xlsm? Thanks for your help!
Sub save_as()
Dim workbook_Name As Variant
workbook_Name = Application.GetSaveAsFilename
If workbook_Name <> False Then
ActiveWorkbook.SaveAs Filename:=workbook_Name, FileFormat:=52
End If
End Sub
I'm trying to make an my excel macro to save the file with a new name at the end of the script. The script saves the file but not in excel macro enabled format. Could you help me to correct it so that it would save my file as .xlsm? Thanks for your help!
Sub save_as()
Dim workbook_Name As Variant
workbook_Name = Application.GetSaveAsFilename
If workbook_Name <> False Then
ActiveWorkbook.SaveAs Filename:=workbook_Name, FileFormat:=52
End If
End Sub