PC Review


Reply
Thread Tools Rate Thread

Disabling SAVE AS Temporarily

 
 
monir
Guest
Posts: n/a
 
      8th Jan 2008
Hello;

I need to disable the File option Save As while the file test.xls is open,
and return to normal File options on exit.
How to do that ??
The following w/b event DOES NOT produce the desired effect:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
'MS Excel help: SaveAsUi True if the Save As dialog box will be displayed
SaveAsUI = False
End Sub

Thank you.
 
Reply With Quote
 
 
 
 
JP
Guest
Posts: n/a
 
      8th Jan 2008
How about

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
If SaveAsUI Then
MsgBox ("The 'Save As' function has been disabled."), vbInformation,
"Save As Disabled"
Cancel = True
End If
End Sub



HTH,
JP

On Jan 7, 9:34*pm, monir <mo...@discussions.microsoft.com> wrote:
> Hello;
>
> I need to disable the File option Save As while the file test.xls is open,
> and return to normal File options on exit.
> How to do that ??
> The following w/b event DOES NOT produce the desired effect:
>
> Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
> 'MS Excel help: SaveAsUi True if the Save As dialog box will be displayed
> * * SaveAsUI = False
> End Sub
>
> Thank you.


 
Reply With Quote
 
monir
Guest
Posts: n/a
 
      8th Jan 2008
Perfect! Thank you very much.


"JP" wrote:

> How about
>
> Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
> Boolean)
> If SaveAsUI Then
> MsgBox ("The 'Save As' function has been disabled."), vbInformation,
> "Save As Disabled"
> Cancel = True
> End If
> End Sub
>
>
>
> HTH,
> JP
>
> On Jan 7, 9:34 pm, monir <mo...@discussions.microsoft.com> wrote:
> > Hello;
> >
> > I need to disable the File option Save As while the file test.xls is open,
> > and return to normal File options on exit.
> > How to do that ??
> > The following w/b event DOES NOT produce the desired effect:
> >
> > Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
> > 'MS Excel help: SaveAsUi True if the Save As dialog box will be displayed
> > SaveAsUI = False
> > End Sub
> >
> > Thank you.

>
>

 
Reply With Quote
 
JP
Guest
Posts: n/a
 
      8th Jan 2008
Glad to hear it worked!

--JP

On Jan 8, 12:04*am, monir <mo...@discussions.microsoft.com> wrote:
> Perfect! *Thank you very much.
>
>
>
> "JP" wrote:
> > How about

>
> > Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
> > Boolean)
> > If SaveAsUI Then
> > MsgBox ("The 'Save As' function has been disabled."), vbInformation,
> > "Save As Disabled"
> > Cancel = True
> > End If
> > End Sub

>
> > HTH,
> > JP

>
> > On Jan 7, 9:34 pm, monir <mo...@discussions.microsoft.com> wrote:
> > > Hello;

>
> > > I need to disable the File option Save As while the file test.xls is open,
> > > and return to normal File options on exit.
> > > How to do that ??
> > > The following w/b event DOES NOT produce the desired effect:

>
> > > Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
> > > 'MS Excel help: SaveAsUi True if the Save As dialog box will be displayed
> > > * * SaveAsUI = False
> > > End Sub

>
> > > Thank you.- Hide quoted text -

>
> - Show quoted text -


 
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
temporarily disabling subroutines NDBC Microsoft Excel Programming 1 24th Jul 2009 06:35 AM
Disabling A Program(s) Temporarily =?Utf-8?B?U2NvdGlyaXNo?= Windows XP Help 7 8th May 2006 04:38 PM
Temporarily disabling messenger =?Utf-8?B?SG9tZSBuZXR3b3JrZWQgY29uZnVzZWQ=?= Windows XP Messenger 1 28th Mar 2006 06:28 PM
temporarily disabling programs, possible?? Eeek! Windows XP Basics 1 16th Oct 2003 02:00 AM
temporarily disabling programs, possible?? Eeek! Windows XP General 1 16th Oct 2003 02:00 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:35 PM.