I am trying to open two different forms depending on if I click yes or no from a message box. The code runs but both yes and no open the same form. Is it possible to open two different forms? My code is posted below.
Both open Form3 when clicked. Thanks mbrown686886
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MsgBox("Nickname?", MsgBoxStyle.YesNo)
'This code will open the Form3
If MsgBoxResult.Yes Then
Form3 = Nothing
Form3.Show()
'This code will open the Form9
ElseIf MsgBoxResult.No Then
Form9 = Nothing
Form9.Show()
End If
End Sub