I copied the code example below from A97 HELP. However,
I get an error when I try to use something like frmMainMenu.Hide
and am uncertain as to why. Ideas?
The following example assumes two UserForms in a program. In
UserForm1's Initialize event, UserForm2 is loaded and shown. When the
user clicks UserForm2, it is hidden and UserForm1 appears. When
UserForm1 is clicked, UserForm2 is shown again.
' This is the Initialize event procedure for UserForm1
Private Sub UserForm_Initialize()
Load UserForm2
UserForm2.Show
End Sub
' This is the Click event of UserForm2
Private Sub UserForm_Click()
UserForm2.Hide
End Sub
' This is the click event for UserForm1
Private Sub UserForm_Click()
UserForm2.Show
End Sub