View Single Post
  #1  
Old 03-02-2009, 12:54 PM
fanaticny's Avatar
fanaticny fanaticny is offline   Thread Starter  
Wcked Member
Mobile Model: HTC Touch Pro
Mobile Carrier: Sprint
Mobile OS: 6.5

 
Join Date: December 15th, 2007
Posts: 645
Downloads: 0
Uploads: 0
fanaticny Knows Their Stufffanaticny Knows Their Stufffanaticny Knows Their Stufffanaticny Knows Their Stufffanaticny Knows Their Stufffanaticny Knows Their Stufffanaticny Knows Their Stufffanaticny Knows Their Stufffanaticny Knows Their Stufffanaticny Knows Their Stufffanaticny Knows Their Stuff


View fanaticny's Profile   Edit Options Edit Profile Picture View fanaticny's Photo Album Add fanaticny's to Your Contacts Show Groups Edit Avatar Subscribed Threads Private Messages
Default [ ISSUE SOLVED ] I got excited too soon VB help

Im really sorry but i didn't make it work completely, got excited too soon, so here it is again. Well I can validate txtAge.Text now, but im also required to then take the input and assign it to a different variable as Integer, here's what I have:

Dim ageCheck As Boolean
Dim isNum As Integer

ageCheck = IsNumeric(txtAge.Text)
isNum = Integer.Parse(txtAge.Text) "VB doesn't like this line"

If (ageCheck = False) Then
lblResults.Text = "Please correct your age"

ElseIf (isNum < 21) Then
lblResults.Text = txtName.Text & ", you are a youngster!"

ElseIf (isNum >= 21 And isNum < 40) Then
lblResults.Text = txtName.Text & ", you are an adult."

ElseIf (isNum >= 40) Then
lblResults.Text = txtName.Text & ", you are over the hill!"

End If