title: I want my label.caption value to change due to the value input in text.text
body: <p>I'm learning to program with "VISUAL BASIC 6.0". I want my label1.caption value to change with respect to the value in the textbox1.caption... the code i'm using is below, but its still not working. please help me out. Regards.</p>
  
  <pre><code>If Val(Text1) &gt; 0 And Val(Text1) &lt; 39 Then
    Label20.Caption = "0"
  Else
    If Val(Text1) &gt; 40 And Val(Text1) &lt; 44 Then
      Label20.Caption = "1"
    Else
      If Val(Text1) &gt; 45 And Val(Text1) &lt; 49 Then
        Label20.Caption = "2"
      Else
        If Val(Text1) &gt; 50 And Val(Text1) &lt; 59 Then
          Label20.Caption = "3"
        Else
          If Val(Text1) &gt; 60 And Val(Text1) &lt; 69 Then
            Label20.Caption = "4"
          Else
            If Val(Text1) &gt; 70 And Val(Text1) &lt; 100 Then
              Label20.Caption = "5"
            End If
  </code></pre>