[ ISSUE SOLVED ] I got excited too soon VB help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • topostitch
    Senior Member

    • Jan 08
    • 493
    • AT&T Tilt

    #1

    [ 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
  • D/\SH
    Owner - Staff

    • Feb 07
    • 31777
    • TP, TP2, soon Hero
    • 6.5
    • SPJ

    #2
    Re: I got excited too soon VB help

    mmmmm. havent been working with visual basic too much lately....... i know tere are mad support forums out there for it that would be able to help you more than i could..... and your not getting any sytax errors are you?

    Comment

    • topostitch
      Senior Member

      • Jan 08
      • 493
      • AT&T Tilt

      #3
      Re: I got excited too soon VB help

      Im wansn't running it stricktly thru BV.net, i was getting errors while trying to load the website and that was giving me xml like error which im not familiar with yet, but im good now, i just needed nested if/else statements. Thanks!!

      Comment

      • Superman369
        Senior Member

        • Sep 22
        • 2084
        • Touch Prizo!!!
        • 6.5
        • sprint

        #4
        Re: I got excited too soon VB help

        Glad you got it, marking as solved.
        Got a ? Use The Help Desk Here
        Need it all in one thread?Click Here
        Learn How To Flash A Rom?Click Here
        Are You New To The Scene?Click Here
        Need to Learn How To Search? Click Here
        The End All, Be All of Noob Guides.Click Here

        sigpic
        Make Sure You Hit The Thanks And/Or Installed Buttons If Someone Helps You Or You Use There Programs!!!

        Comment

        Working...