Close User Form

  • Thread starter Thread starter Gazz_85
  • Start date Start date
G

Gazz_85

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??
 
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
 
Back
Top