PC Review


Reply
Thread Tools Rate Thread

diabling save

 
 
=?Utf-8?B?RWxlbmE=?=
Guest
Posts: n/a
 
      17th May 2005
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 With Quote
 
 
 
 
=?Utf-8?B?RWxlbmE=?=
Guest
Posts: n/a
 
      17th May 2005
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
> >

 
Reply With Quote
 
=?Utf-8?B?SmltIFRob21saW5zb24=?=
Guest
Posts: n/a
 
      17th May 2005
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 With Quote
 
=?Utf-8?B?RWxlbmE=?=
Guest
Posts: n/a
 
      17th May 2005
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
> >

 
Reply With Quote
 
=?Utf-8?B?SmltIFRob21saW5zb24=?=
Guest
Posts: n/a
 
      17th May 2005
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
>

 
Reply With Quote
 
=?Utf-8?B?RWxlbmE=?=
Guest
Posts: n/a
 
      17th May 2005
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Diabling Format... for harddisks Lars-Erik Østerud Windows XP General 8 29th Nov 2004 09:21 AM
Diabling saving passwords in IE 6 Andrew Windows XP Security 0 8th Oct 2004 01:25 PM
Diabling right-click John Microsoft Windows 2000 Group Policy 1 21st May 2004 11:51 AM
Diabling Windows+L =?Utf-8?B?aGFyaXNo?= Windows XP Security 0 14th Jan 2004 03:21 PM
Diabling Tabpage Raju Shrestha Microsoft Dot NET Framework Forms 2 10th Dec 2003 09:14 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:00 AM.