Vbalearner85
Board Regular
- Joined
- Jun 9, 2019
- Messages
- 139
- Office Version
- 2016
- Platform
- Windows
Hi,
I am using below macro to save .xlsm file in particular folder in format "dd-mm-yy.xlsm", which is working fine.
Tried saving as "xls" format, which gives compatibility issues and shows file as corrupt
But if I want to save current file as ".xlsx" by replacing format in below macro in Excel 2016, it is giving error "Run-time error '1004'-The extension cannot be used with the selected file type". Please assist
Sub documentssave()
Application.DisplayAlerts = False
Application.Calculation = xlManual
ActiveWorkbook.SaveAs ("D:\Data Hub\" & Format(Now(), "dd-mm-yy") & ".xlsm")
Application.DisplayAlerts = True
Application.Calculation = xlAutomatic
End Sub
I am using below macro to save .xlsm file in particular folder in format "dd-mm-yy.xlsm", which is working fine.
Tried saving as "xls" format, which gives compatibility issues and shows file as corrupt
But if I want to save current file as ".xlsx" by replacing format in below macro in Excel 2016, it is giving error "Run-time error '1004'-The extension cannot be used with the selected file type". Please assist
Sub documentssave()
Application.DisplayAlerts = False
Application.Calculation = xlManual
ActiveWorkbook.SaveAs ("D:\Data Hub\" & Format(Now(), "dd-mm-yy") & ".xlsm")
Application.DisplayAlerts = True
Application.Calculation = xlAutomatic
End Sub