LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Disable Close X Button On Excel Application


Hi Peeps.

I have used the following code to disable the X button on Userforms
but is this possible with the main Excel Application X button? If s
what do I need to change and where do I need to put the code?



Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode A
Integer)
If CloseMode < vbFormCode Then
MsgBox "Please Note!" & Chr(13) & Chr(13) & "The Close Button Has Bee
Disabled To Ensure No Loss Of Data." & Chr(13) & Chr(13) & "Please Us
The Save And Close Button At The Bottom Of This Menu!", _
vbOKOnly, "IMPORTANT!"
Cancel = True
End If
End Sub


Hope someone can help!

Celtic_Avenger
:confused

--
Celtic_Avenge
-----------------------------------------------------------------------
Celtic_Avenger's Profile: http://www.excelforum.com/member.php...fo&userid=1410
View this thread: http://www.excelforum.com/showthread.php?threadid=27397

 
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
Disable Close Button dan Excel Discussion (Misc queries) 5 September 22nd 06 07:39 PM
Disable Close "X" button on User Forms Celtic_Avenger[_49_] Excel Programming 2 October 11th 04 06:20 PM
macro to close excel application other than application.quit mary Excel Programming 1 September 14th 04 03:43 PM
Disable close button of Modeless Userform RB Smissaert Excel Programming 2 September 13th 03 09:46 PM
SIMPLEST way to disable "close" button on form? codytheretriever Excel Programming 4 August 7th 03 09:00 PM


All times are GMT +1. The time now is 04:43 AM.

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

About Us

"It's about Microsoft Excel"