Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 ![]() ![]() ![]() ![]() -- 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Disable Close Button | Excel Discussion (Misc queries) | |||
Disable Close "X" button on User Forms | Excel Programming | |||
macro to close excel application other than application.quit | Excel Programming | |||
Disable close button of Modeless Userform | Excel Programming | |||
SIMPLEST way to disable "close" button on form? | Excel Programming |