View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Celtic_Avenger[_57_] Celtic_Avenger[_57_] is offline
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