I had Excel record the steps of choosing Save As and applying a specific location and file name, and it produces this VBA code:
ActiveWorkbook.SaveAs Filename:= _
"H:\Documents\Data\Tasks\Transfer.xlsx" _
, FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
Have also tried setting the FileFormat as
FileFormat:=51
I also included the following handlers, but it doesn't work with or without them:
On Error Resume Next
Application.DisplayAlerts = False
The original file is in .xls format.
When I run the macro allowing display alerts, it produces this error:
Run-time error '1004':
Method 'SaveAs' of object '_Workbook' failed
This used to work until I believe going to Windows 8 and a new network server at work. Could something like that affect SaveAs?
What am I missing? Thanks for any tips you might have.