Use UCase() or LCase () function. all string will be converted to upper or lower string
If UCase(Text1.Text) = UCase("red") And Label4.BackColor = vbRed Then
score = score + 1
Label6.Caption = score
End If
or if you just want to make uppercase the first string
mystring = Text1.Text
If (UCase(Left(mystring, 1)) & Right(mystring, Len(mystring) - 1)) = "Red" Then
score = score + 1
Label6.Caption = score
End If
Jx_Man
Senior Poster
3,538 posts since Nov 2007
Reputation Points: 1,488
Solved Threads: 524
Skill Endorsements: 64
Hi,
or else, LostFocus of Text1, write this code:
Text1.Text = StrConv(Text1.Text, vbProperCase)
and check for "Red"
Regards
Veena
QVeen72
Veteran Poster
1,017 posts since Nov 2006
Reputation Points: 118
Solved Threads: 164
Skill Endorsements: 5
What if i am partially color blind and red appears maroon or saffron to me. Does this concept of typing the name of the color in the code work ?
Just a thought, though. :)
debasisdas
Posting Genius
6,968 posts since Feb 2007
Reputation Points: 722
Solved Threads: 457
Skill Endorsements: 20
Question Answered as of 8 Months Ago by
QVeen72,
debasisdas
and
Jx_Man