I am trying to teach myself about userforms now. The problem I have is that when I move from one to another, the first one doesn't hide like I think it should. The second one just piles on top of it. It is pretty simple code, nothing fancy. Am I not understanding something correctly? Here is a sample of my code.
Also, I tried putting a stop in the code before turning off the screen updating, to see if anything was different. When I did that, the first form disappeared, and after I pressed play again, the 2nd form was the only one visible. Without stopping though, both forms are visible on the screen. Any suggestions?
Code:
Private Sub OptionButton2_Click()
'Option to Edit Associate List
Switchboard_Form.OptionButton2.Value = False
Switchboard_Form.Hide
Application.ScreenUpdating = False
With Sheets("Assoc List")
.Visible = xlSheetVisible
.Activate
End With
Assoc_List.Show
Sheets("Assoc List").Visible = xlSheetHidden
Application.ScreenUpdating = True
End Sub
Also, I tried putting a stop in the code before turning off the screen updating, to see if anything was different. When I did that, the first form disappeared, and after I pressed play again, the 2nd form was the only one visible. Without stopping though, both forms are visible on the screen. Any suggestions?