Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / November 2007

Tip: Looking for answers? Try searching our database.

Restrict dialog box closing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Patrick C. Simonds - 28 Nov 2007 18:27 GMT
Is there any way to prevent a user from closing a dialog box by clicking on
the   X   in the upper right corner?
john - 28 Nov 2007 18:48 GMT
try this but make sure you have another method to dismiss the form:

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode <> 1 Then
       Cancel = 1
       msg = MsgBox("Please Use Cancel Button", 16, "Warning")
   End If
End Sub

Signature

JB

> Is there any way to prevent a user from closing a dialog box by clicking on
> the   X   in the upper right corner?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.