Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel VBA Excel 2000

Status
Not open for further replies.

KenReay

Programmer
Aug 15, 2002
5,424
GB
Hi

I am trying to save a workbook in VBA

oWs.SaveAs etc does the job if the file does not already exist, but how do I save it when the file does exist without receiving a warning message?, I would have thought it was simple as oWs.Save, but this gives a compile error saying method not available

Thanks

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
From excel help - saveas method:

Filename Optional Variant. A string that indicates the name of the file to be saved. You can include a full path; if you don't, Microsoft Excel saves the file in the current folder.

so:
ows.saveas

without a path should perform a save in the folder that it has been opened from

Rgds, Geoff
[blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top