douglashindle
Technical User
I created a macro by recording keystrokes. There were several prompts during recording. I need to automate the answers. One question required me to agree to only save the active sheet or be prompted for a name for each sheet. Another prompt suggested I will drop formatting. I agreed to drop the formatting.
When running the macro I get:
Run-Time error '1004':
Method'SaveAs' of object'_Workbook' failed
There are no prompts when running the macro.
Here is the beginning of the code:
ChDir "S:\"
Workbooks.Open Filename:="S:\file1.xls"
ActiveWorkbook.SaveAs Filename:="S:\merge\test.csv", _
FileFormat:=xlCSV, CreateBackup:=False
Any ideas?
When running the macro I get:
Run-Time error '1004':
Method'SaveAs' of object'_Workbook' failed
There are no prompts when running the macro.
Here is the beginning of the code:
ChDir "S:\"
Workbooks.Open Filename:="S:\file1.xls"
ActiveWorkbook.SaveAs Filename:="S:\merge\test.csv", _
FileFormat:=xlCSV, CreateBackup:=False
Any ideas?