
Originally Posted by
Laurin
Here is the code in userform1:
Private Sub CommandButton2_Click()
UserForm1.Hide
UserForm2.Show
End Sub
And the code in userform2:
Private Sub CommandButton2_Click()
UserForm2.Hide
UserForm1.Show
End Sub
I don't see what you could be doing wrong... I tried with the exact same code, and it works. Afterwards, I tried this:
Here is the code in userform1:
Private Sub CommandButton2_Click()
Unload UserForm1 ''changed this line
UserForm2.Show
End Sub
And the code in userform2:
Private Sub CommandButton2_Click()
UserForm2.Hide
UserForm1.Show
End Sub
which also worked.
Maybe it's because you set the screenupdating to True at the wrong moment? Test it by commenting out the lines that say 'Screenupdating = False'.
Edit: ok, seems it's already solved...
Bookmarks