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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top