Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 343
Default Restrict dialog box closing

Is there any way to prevent a user from closing a dialog box by clicking on
the X in the upper right corner?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default Restrict dialog box closing

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

--
JB


"Patrick C. Simonds" wrote:

Is there any way to prevent a user from closing a dialog box by clicking on
the X in the upper right corner?


Reply
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
closing read-only without save dialog box appearing JNW Excel Programming 0 December 28th 05 03:14 PM
Opening/Closing workbooks without dialog boxes Steve :) Excel Programming 2 September 20th 05 09:37 PM
Get the Result of Excel Dialog, when closing excel? m.ahrens Excel Programming 3 February 24th 05 02:59 PM
Dialog box when closing an unsaved spreadsheet Kathy4080 Excel Discussion (Misc queries) 1 January 4th 05 10:28 PM
closing excel after closing a workbook CWalsh[_2_] Excel Programming 3 January 21st 04 03:33 PM


All times are GMT +1. The time now is 11:22 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"