Can somebody tell me why this does not work.
Code 1:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MsgBox("If Statement", MsgBoxStyle.YesNo)
If MsgBoxResult.Yes Then MsgBox("You clicked yes")
If MsgBoxResult.No Then MsgBox("You clicked no")
End Sub
End Class
Code 2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MsgBox("If Statement", MsgBoxStyle.YesNo)
If MsgBoxResult.Yes Then
MsgBox("You clicked yes")
End If
If MsgBoxResult.No Then
MsgBox("You clicked no")
End If
End Sub
End Class
Both of these say "you clicked yes" and right after that "you clicked no". It does that in the same order whether I click Yes or No.
Code 1:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MsgBox("If Statement", MsgBoxStyle.YesNo)
If MsgBoxResult.Yes Then MsgBox("You clicked yes")
If MsgBoxResult.No Then MsgBox("You clicked no")
End Sub
End Class
Code 2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MsgBox("If Statement", MsgBoxStyle.YesNo)
If MsgBoxResult.Yes Then
MsgBox("You clicked yes")
End If
If MsgBoxResult.No Then
MsgBox("You clicked no")
End If
End Sub
End Class
Both of these say "you clicked yes" and right after that "you clicked no". It does that in the same order whether I click Yes or No.