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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save Read Only File

Status
Not open for further replies.

Kevsim

Instructor
Apr 18, 2000
385
AU
I have an Excel worksheet that opens as Read Only, I wish to do the following.
There is a command button on the spreadsheet, that when pressed updates the spreadsheet, I wish to have VB code for when the spreadsheet updates, it will auto save the update.
I would appreciate your assistance.
kevsim
 
Not entirely sure what you are asking for. If all you are trying to do is save the current workbook using VBA, the code would be:
Code:
ActiveWorkbook.Save
which could certainly be called within the code that updates the sheet.

VBAjedi [swords]
 
VBAjedi, have you tried to save a workbook opened ReadOnly ?
 
If macros are enabled, shouldn't one be able to do the following?

[tt]activeworkbook.saveas "c:\newname.xls"[/tt]

Roy-Vidar
 
Roy, the OP asked for it will auto save the update and I don't think he wanted a new workbook.
 
Yup - so now there are two alternatives - give it up (or not open as read only) or save as a new file/workbook...

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top