View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
Old Car Old Car is offline
external usenet poster
 
Posts: 9
Default Saving workbook from VB

Application.Dialogs(xlDialogSaveCopyAs).Show "C:\Test.xls"

gives me a run-time error.

Run-time error '1004':
Application-defined or object-defined error.

Does you know why? Thanks.

"Jim Thomlinson" wrote in message
...
All of these are possible solutions... Depends exactly what you want...

ThisWorkbook.Save
ThisWorkbook.SaveAs "C:\Test.xls"
ThisWorkbook.SaveCopyAs "C:\test.xls"
Application.Dialogs(xlDialogSaveAs).Show "C:\Test.xls"
Application.Dialogs(xlDialogSaveCopyAs).Show "C:\Test.xls"

HTH

Thisworkbook.

"Old Car" wrote:

How can I effectively do a "save" or "save as" of a workbood from VB. I
assume there are methods that support this. Thanks.