Results 1 to 3 of 3

Thread: [02/03] Comparing strings (NEWB ALERT)

Threaded View

  1. #1

    Thread Starter
    Banned
    Join Date
    Sep 2007
    Posts
    11

    Unhappy [02/03] Comparing strings (NEWB ALERT)

    Hey guys, really newbish question here, but this book isnt helping me much in my plight. So, I'm trying to make a program that will help my classmates study their vocab for school (I'm getting extra credit for it! ) and my code does not do what I want it to. I've set it up so that it compares the two strings (The answer, and the input) like so:
    answer = "*Whatever the answer is here, it's randomly generated based on a number, I have like, 125 if/then statements based on random numbers >_>*"
    Code:
    input = Convert.ToString(Me.txtAnswer.Text)
            If answer.ToUpper = input.ToUpper Then
                Points = Points + 1
                Me.picPass.Visible = True
                Me.picFail.Visible = False
            Else
                Points = Points
                Me.picFail.Visible = True
                Me.picPass.Visible = False
            End If
    And this if/then always defaults to the false, because I always see the red checkmark, which indicates a fail. Thanks for your help!
    Last edited by bugmenot; Feb 4th, 2008 at 12:21 AM. Reason: Forgot to format the code as code >_>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width