Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable save, but not save as
I am trying to disable saving in order to not overwrite a master file. But I still want others to be able to save as a different file. I tried this as a possibility:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If ThisWorkbook.Name = "master.xls" Then MsgBox "Can not save with this name - do saveas with a new name" Cancel = True End If End Sub But it won't let me do the 'save as' action either. Any Suggestions? Thanks, Wes |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable save, but not save as
Non-VBA approach:
Either use Windows Explorer to mark the file ReadOnly or even use a password to open for updating. When you save your master, file|SaveAs|Tools|General Options| give it a nice password to modify. This is where it's hidden in xl2002. In earlier versions, I think it was just under: File|SaveAs|Options Wstohler wrote: I am trying to disable saving in order to not overwrite a master file. But I still want others to be able to save as a different file. I tried this as a possibility: Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If ThisWorkbook.Name = "master.xls" Then MsgBox "Can not save with this name - do saveas with a new name" Cancel = True End If End Sub But it won't let me do the 'save as' action either. Any Suggestions? Thanks, Wes -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how can i disable save i need save as only | New Users to Excel | |||
Disable Save/Save As - not working? | Excel Discussion (Misc queries) | |||
Disable Quick Save & Save As | Excel Discussion (Misc queries) | |||
Disable save | Excel Discussion (Misc queries) | |||
Disable save | Setting up and Configuration of Excel |