Run Time Error 1004

  • Thread starter Thread starter Robert
  • Start date Start date
R

Robert

A client is getting a runtime error 1004, "Application-
defined or object-defined error" on the following
statement:

Sheets(1).SaveAs FileName:="POImportFile.xls",
FileFormat:=xlNormal

Of course, I do not get the error. I am using Excel 97.
The client is using Excel 2003.

Anyone got any ideas?
 
Workbooks are saved, not sheets.

Activeworkbook.SaveAs FileName:="POImportFile.xls", _
FileFormat:=xlNormal

If you want to save a single sheet

sheets(1).Copy
Activeworkbook.SaveAs FileName:="POImportFile.xls", _
FileFormat:=xlNormal
activeworkbook.Close SaveChanges:=False
 
Back
Top