Skip to main content
gamedev.net
🔒 Locked

A very easy question about Visual Basic

Started by barkera0 Oct 7, 2006 at 8:13 PM 3 replies 800+ views
Original Post
barkera0
barkera0
Hi. I'm trying to execute a Select Case statement in Visual Basic. See code:

Select Case Box1.Text

Select Case name
Case "bob" or "joe"
other code here
Case "phil" or "john"
other code here
End Select

End Select
Anyway, when I use those 'or' statements I get an error saying: Conversion from string "bob" to type 'Long' is not valid. To get to this the user entered one of those names into a textbox and clieck a button. How can I get this working?
iMalc
iMalc
Quote:
Original post by Nice Coder
select case name
case is = "bob" or is = "joe"
code...
end select

Should be what your after
That is not Visual Basic syntax. Why would you post that?
Nice Coder
Nice Coder
Quote:
Original post by iMalc
Quote:
Original post by Nice Coder
select case name
case is = "bob" or is = "joe"
code...
end select

Should be what your after
That is not Visual Basic syntax. Why would you post that?


sorry :( late night and i thought that was how to do that. (forgot about the , )

Post deleted.
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.