View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jean-Paul Viel Jean-Paul Viel is offline
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