VB If Statements

Intel / Pentium 4 system
February 9, 2009 at 11:52:32
Specs: Xp, ?
I am trying to write a script that when i type in somthing it will goto a specific peice of code. I have the goto part worked out by itself but when its coupled with a If Statement it does not work. Here is my code:
Dim T As String
T = Text1.Text
If T = "gold" Then GoTo Runescape
If T = "Sponge" Then GoTo Bob
Text1.Text = "Gary"
GoTo Fin
Text1.Text = "Noob"
GoTo Fin
Text2.Text = T
'End Code

I dont see what is wrong with my code but if someone does see it, could you point it out.

See More: VB If Statements

Report •

February 10, 2009 at 15:35:17
The issues of actually using GoTo aside, it looks like the code should work. Remember, though, that the comparison is case sensitive.

Report •

February 11, 2009 at 08:47:29
Yea, I know Goto is not a good code to use, but Its just for a login screen. I tried the code without the goto's also and it does not work for me. I am using the proper cases(I knew It was case sensitive) and nothing works. The most I can get it do is clear a text box(and did not intend for the code to do that)

Report •

Related Solutions

Ask Question