Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Save, save as, page setup dimmed out in unprotected excel sheet? ccKeithJ Excel Discussion (Misc queries) 3 December 14th 07 07:07 PM
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() Paul Dennis Excel Discussion (Misc queries) 5 September 18th 06 05:34 PM
Diabling Hyperlinks in a Spreadsheet days_crazed Excel Worksheet Functions 2 June 28th 06 03:30 PM
when i save xls file, debug script is running and canno't save fil Imtiaz Excel Discussion (Misc queries) 1 July 16th 05 03:47 PM
diabling the worksheet menu bar? Rich Cooper Excel Programming 1 May 14th 04 08:34 PM


All times are GMT +1. The time now is 01:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"