#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default Close User Form

I have a form that is used to filter information, within that form there are
sub forms of information. how do i set it up so that once you click an option
on a sub form it automatically closes and returns to original form??
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Close User Form

Use the below code from the subform

Unload Me


'Example ------------------------
'Load userform2 from userform1 (on command button click)
Private Sub CommandButton1_Click()
Load UserForm2
UserForm2.Show
End Sub

'Unload userform2 and get back to userform1
Private Sub CommandButton1_Click()
Unload Me
End Sub

In sub form call

Unload Me
--
If this post helps click Yes
---------------
Jacob Skaria


"Gazz_85" wrote:

I have a form that is used to filter information, within that form there are
sub forms of information. how do i set it up so that once you click an option
on a sub form it automatically closes and returns to original form??

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
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
Macro to Prompt User to Close After Saving Rutabaga Excel Discussion (Misc queries) 2 July 12th 07 12:38 AM
How do I fill a cell in a user form from a selection on same form? Terry Tipsy Excel Discussion (Misc queries) 4 June 11th 07 02:59 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 09:06 PM.

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"