Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 343
Default Text case question

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Text case question

One way:

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

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



"Patrick C. Simonds" wrote:

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


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing multiple cell text from lower case to upper case Patti Excel Discussion (Misc queries) 2 January 4th 08 08:35 PM
vlookup -- Upper case and Lower case text teec_detroit Excel Discussion (Misc queries) 1 August 6th 07 04:40 PM
Select Case question Otto Moehrbach Excel Programming 5 February 28th 07 09:32 PM
Change the text from lower case to upper case in an Excel work boo dave01968 Excel Discussion (Misc queries) 2 December 9th 05 09:09 AM
How do I change existing text from lower case to upper case CT Cameron Excel Discussion (Misc queries) 2 November 30th 04 01:07 AM


All times are GMT +1. The time now is 11:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"