Text case question

  • Thread starter Thread starter Patrick C. Simonds
  • Start date Start date
P

Patrick C. Simonds

How can I make the YES in the code below hit even if the text in TextBox1 is
lower case or a mix of both?

If TextBox4.Text = "YES" Then
OptionButton2.Value = True
Else
OptionButton1.Value = True
End If
 
One way:

If lcase(TextBox4.Text) = lcase("YES") Then

If you're careful, you could use:
If lcase(TextBox4.Text) = "yes" Then
 
Back
Top