Hi,
I have a macro in .xlsm that users run and then the last step is to save the file as .xlsx. The problem is that I keep getting a run time error "Method "SaveAs" of object '_Workbook' failed". Users are to give their file a unique name.
I have researched and tried many solutions to no avail. My original macro selected the tabs needed and moved them to a new file. The problem that started happening is that if there is too much data being copied/moved, then I got a run time error. My new solution, should it ever work, is to save the .xlsm file as .xlsx and delete the tabs that are not needed.
What am I doing wrong?
Please help.
Dim file_name As Variant
file_name = Application.GetSaveAsFilename(FileFilter:="Microsoft Excel file (*.xlsx), *.xlsx")
ActiveWorkbook.SaveAs Filename:=file_name, FileFormat:=x1OpenXMLWorkbook, CreateBackup:=False
Thank you!
Bookmarks