View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default X button at top right of userforms

Todd,

The UserForm_QueryClose event will fire when the user closes the
form with the X button in the top right of the form.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Todd Huttenstine" wrote in
message ...
Hey

A workbook opens when a userform is loaded. I have it
setup for that same workbook to close when the
commandbutton named "Close" is clicked, but I also would
like to get it to where it closes when the X at the top
right of the userform is clicked as well. I dont know
what event this would be. How would I get it to do this?


Thank you
Todd Huttenstine