Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
diabling save
I am trying to disable the "save" command on the menu and tool bar. I would
like the user only to be able to "save as". I do not want the user to be able to overwrite the original document. I would like them to save it as a new document if the so wish to do. Could someone tell me the VB code to do this? Thanks in Advance, Elena |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
diabling save
Thanks for the code. I need the user to create a new document to save each
time. They also need to be able to edit it. Proctecting the workbook would not allow for that. The code is the way i need to proceed. I'll test out the code! Thank you :) Elena "Jim Thomlinson" wrote: Why not just create a template (.xlt) file or set up your file as read only, or even just proctect the workbook. If you use VBA then every time the file is to be saved it has to be saved as a new file name. For example if someone creates a file from your master document then they must save it under a new name. If they then want to modify the file they created they once again have to save it as a new name. End users get very frustrated by this. If you still want to proceed with VBA here is some code for you to test... Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Cancel = True Application.Dialogs(xlDialogSaveAs).Show "C:\Test.xls" End Sub HTH "Elena" wrote: I am trying to disable the "save" command on the menu and tool bar. I would like the user only to be able to "save as". I do not want the user to be able to overwrite the original document. I would like them to save it as a new document if the so wish to do. Could someone tell me the VB code to do this? Thanks in Advance, Elena |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
diabling save
Why not just create a template (.xlt) file or set up your file as read only,
or even just proctect the workbook. If you use VBA then every time the file is to be saved it has to be saved as a new file name. For example if someone creates a file from your master document then they must save it under a new name. If they then want to modify the file they created they once again have to save it as a new name. End users get very frustrated by this. If you still want to proceed with VBA here is some code for you to test... Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Cancel = True Application.Dialogs(xlDialogSaveAs).Show "C:\Test.xls" End Sub HTH "Elena" wrote: I am trying to disable the "save" command on the menu and tool bar. I would like the user only to be able to "save as". I do not want the user to be able to overwrite the original document. I would like them to save it as a new document if the so wish to do. Could someone tell me the VB code to do this? Thanks in Advance, Elena |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
diabling save
i found the code, if anyone else needs it!
Sub DisableMenuItems() With Application.CommandBars("File") ..Controls(4).Enabled = False 'Save Button End With End Sub Good Luck! "Jim Thomlinson" wrote: Why not just create a template (.xlt) file or set up your file as read only, or even just proctect the workbook. If you use VBA then every time the file is to be saved it has to be saved as a new file name. For example if someone creates a file from your master document then they must save it under a new name. If they then want to modify the file they created they once again have to save it as a new name. End users get very frustrated by this. If you still want to proceed with VBA here is some code for you to test... Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Cancel = True Application.Dialogs(xlDialogSaveAs).Show "C:\Test.xls" End Sub HTH "Elena" wrote: I am trying to disable the "save" command on the menu and tool bar. I would like the user only to be able to "save as". I do not want the user to be able to overwrite the original document. I would like them to save it as a new document if the so wish to do. Could someone tell me the VB code to do this? Thanks in Advance, Elena |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
diabling save
That only gets rid of the save button. The user can still select save off the
file menu or use Ctrl + S... Also the save button is gone permanantly doing that unless you put it back and it is gone for all excel files. You are making modificatons at the application level for a workbook level issue. I am not saying don't do it. I am just saying that there are side effects to what you propose. HTH "Elena" wrote: I am trying to disable the "save" command on the menu and tool bar. I would like the user only to be able to "save as". I do not want the user to be able to overwrite the original document. I would like them to save it as a new document if the so wish to do. Could someone tell me the VB code to do this? Thanks in Advance, Elena |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
diabling save
This doesn't work. I need to disable the "save" option so they cannot save
it to the original file. I would like the "save" option to be disabled in the menu & tool bar. I would like for them to still be able to click "save as" on the menu bar. This way, the document can be saved under a name they so select. Thanks anyway, Any other ideas? ~Elena "Jim Thomlinson" wrote: Why not just create a template (.xlt) file or set up your file as read only, or even just proctect the workbook. If you use VBA then every time the file is to be saved it has to be saved as a new file name. For example if someone creates a file from your master document then they must save it under a new name. If they then want to modify the file they created they once again have to save it as a new name. End users get very frustrated by this. If you still want to proceed with VBA here is some code for you to test... Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Cancel = True Application.Dialogs(xlDialogSaveAs).Show "C:\Test.xls" End Sub HTH "Elena" wrote: I am trying to disable the "save" command on the menu and tool bar. I would like the user only to be able to "save as". I do not want the user to be able to overwrite the original document. I would like them to save it as a new document if the so wish to do. Could someone tell me the VB code to do this? Thanks in Advance, Elena |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Save, save as, page setup dimmed out in unprotected excel sheet? | Excel Discussion (Misc queries) | |||
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() | Excel Discussion (Misc queries) | |||
Diabling Hyperlinks in a Spreadsheet | Excel Worksheet Functions | |||
when i save xls file, debug script is running and canno't save fil | Excel Discussion (Misc queries) | |||
diabling the worksheet menu bar? | Excel Programming |