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 / Word / Programming / May 2006

Tip: Looking for answers? Try searching our database.

how to prevent user from closing User form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
acherony - 19 May 2006 15:50 GMT
HI!,

I made one template macro using Autonew()
Which start UserForm.

I need to prevent/block the User from closing the UserForm with close button
of
Windows from UserForm.

Need Disable Windows close button of Window.

need help  
Greg Maxey - 19 May 2006 15:58 GMT
See:
http://word.mvps.org/FAQs/Userforms/DisableClose.htm
Kodeworks - 19 May 2006 23:34 GMT
acherony

Try using the QueryClose event of your userform.  It fires before the
UserForm closes and you can detect what's trying to close your
userform.

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As
Integer)
  If CloseMode = vbFormControlMenu Then
     Cancel = True
  End If
End Sub

Sunil Jadwani
Kodeworks - Business Automation Solutions
www.kodeworks.com

Rate this thread:






 
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.