Devicon
2011-11-30 21:13:25 UTC
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim numa, numb As Integer
numa = InputBox("Enter a number", "Input value")
numb = InputBox("Enter one more number", "Input value")
Label1.Text = Switch (numa = numb , "Same numbers" _
numa > numb , "Number A is bigger" _
numa < numb, "Number B is bigger")
End Sub
End Class
=============================
Error is with switch command. It always giving me this error.
"Switch is a type and cannot be used as an expression."
I am using VB10 Ultimate
Please help.