PC Review


Reply
Thread Tools Rate Thread

disable save as dialog box

 
 
=?Utf-8?B?RGlvbg==?=
Guest
Posts: n/a
 
      5th Oct 2006
I have a workbook where I disabled all menu items, and the only way to exit
is by choosing the "x" in the upper right corner. I have some code to
disable the "save as" dialog box, that I think used to work, but for some
reason, now does not. In the "This Workbook" object I have:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Workbooks("Urizen.xls").Saved = True
End Sub

I tried adding application.displayalerts=false and this did not work either.

What am I missing?

 
Reply With Quote
 
 
 
 
Jim Cone
Guest
Posts: n/a
 
      5th Oct 2006
Events must be enabled for your code to work.

Run this and see if things get better ...

Sub FixThings
Application.EnableEvents = True
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"Dion" <(E-Mail Removed)>
wrote in message
I have a workbook where I disabled all menu items, and the only way to exit
is by choosing the "x" in the upper right corner. I have some code to
disable the "save as" dialog box, that I think used to work, but for some
reason, now does not. In the "This Workbook" object I have:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Workbooks("Urizen.xls").Saved = True
End Sub

I tried adding application.displayalerts=false and this did not work either.
What am I missing?

 
Reply With Quote
 
=?Utf-8?B?SmltIEphY2tzb24=?=
Guest
Posts: n/a
 
      5th Oct 2006
You could also insert this procedure:
Sub Auto_Close()
ThisWorkbook.Save
ThisWorkbook.Close
End Sub
--
Best wishes,

Jim


"Jim Cone" wrote:

> Events must be enabled for your code to work.
>
> Run this and see if things get better ...
>
> Sub FixThings
> Application.EnableEvents = True
> End Sub
> --
> Jim Cone
> San Francisco, USA
> http://www.realezsites.com/bus/primitivesoftware
>
>
> "Dion" <(E-Mail Removed)>
> wrote in message
> I have a workbook where I disabled all menu items, and the only way to exit
> is by choosing the "x" in the upper right corner. I have some code to
> disable the "save as" dialog box, that I think used to work, but for some
> reason, now does not. In the "This Workbook" object I have:
>
> Private Sub Workbook_BeforeClose(Cancel As Boolean)
> Workbooks("Urizen.xls").Saved = True
> End Sub
>
> I tried adding application.displayalerts=false and this did not work either.
> What am I missing?
>
>

 
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
Disable save/saveas dialog box upon closing Schatzi Microsoft Excel Programming 11 4th May 2011 03:06 PM
disable save dialog box in word 07 Ramesh Microsoft Word Document Management 2 28th Aug 2008 12:17 PM
How do you disable save file dialog? someone Microsoft Excel Setup 2 13th Feb 2005 12:02 AM
How do you disable save file dialog? someone Microsoft Excel Discussion 2 13th Feb 2005 12:02 AM
Possible to disable save/run dialog, force run? Matt Windows XP Internet Explorer 1 10th Oct 2004 05:51 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:15 PM.