LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Close Button on Userform

Hi,



Put some code in the event

UserForm_QueryClose(cancel As Integer, closemode As Integer)

and do:



If closemode = vbFormControlMenu then .



vbFormControlMenu is when the X of the form is use to close.


--
JP

http://www.solutionsvba.com


"Tom Ulincy" wrote in message
...
Is there a way to control what happens when a user clicks
the close button on the caption bar of a userform? If
the user clicks this button I want to close the workbook,
not just hide the userform. Using Excel 2002.

TIA
Tom



 
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
HOW to close a userform using a button CC Excel Discussion (Misc queries) 2 October 10th 08 02:06 PM
Userform close button AOU Excel Discussion (Misc queries) 4 September 21st 07 05:56 PM
Userform + close button Chip Smith Excel Discussion (Misc queries) 2 April 1st 06 09:35 AM
Excel shoud not close all active books when clicking close button technomike Excel Discussion (Misc queries) 0 June 10th 05 05:35 PM
Disable close button of Modeless Userform RB Smissaert Excel Programming 2 September 13th 03 09:46 PM


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