Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Close Form with VBA

Is there a VBA command that will close a userform, the equivalent of the
user clicking the close button on the form title line?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default Close Form with VBA

Unload userformname

or

on the form's code page
Unload Me

--
Patrick Molloy
Microsoft Excel MVP
----------------------------------
"William C. Smith" <wcsmithx*xieee.org wrote in message
.. .
Is there a VBA command that will close a userform, the equivalent of the
user clicking the close button on the form title line?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Close Form with VBA

You may also want to try the Hide method. It keeps the form in memory, so
entries do not get erased, but removes the form from view.

UserForm1.Hide

"William C. Smith" <wcsmithx*xieee.org wrote in message
.. .
Is there a VBA command that will close a userform, the equivalent of the
user clicking the close button on the form title line?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Close Form with VBA

"Patrick Molloy" wrote in news:#QMUmaybDHA.2932
@tk2msftngp13.phx.gbl:

Thanks for the help. Unload userformname works fine. I did not try Unload
Me on the form's code page, but I could not find any reference to Unload Me
in VBA help.

Again, thanks.

Unload userformname

or

on the form's code page
Unload Me


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
Close form automatically upon opening workbook Ixtreme Excel Discussion (Misc queries) 2 September 18th 09 02:56 PM
Close User Form Gazz_85[_2_] Excel Discussion (Misc queries) 1 July 8th 09 10:38 AM
text boxes retaining their last value on form close and restart NDBC Excel Discussion (Misc queries) 3 July 1st 09 12:55 PM
automatically close form before closing Horatio J. Bilge, Jr. Excel Discussion (Misc queries) 0 September 19th 08 08:26 PM
close form code tkaplan Excel Discussion (Misc queries) 1 June 3rd 05 10:49 PM


All times are GMT +1. The time now is 05:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"