PDA

Click to See Complete Forum and Search --> : Does not matter if you type the name in higher case or lower case!


rino_2
Nov 5th, 1999, 09:43 PM
Hi,

I want to type my name as richard, RICHARD, RiChArD etc... and still continue.
At the moment I use the code..

if txtInput.text = "Richard" or txtInput = "richard" or txtInput = "RiChArD" etc...

is there an easy way of doing this or do I have to cover every possible way of typing the name???

Thanks

squidgey
Nov 5th, 1999, 09:57 PM
You can use either the upper or lower case formatting functions:

IF LCASE(txtInput.text) = "richard" then...

or use:

IF UCASE(txtInput.text) = "RICHARD" then...

Yonatan
Nov 5th, 1999, 10:19 PM
An easier way is to put Option Compare Text at the first line of code.
Then, Richard = rICHARD = RicHarD = etc.

------------------
Yonatan
Teenage Programmer
E-Mail: RZvika@netvision.net.il
ICQ: 19552879 (http://www.icq.com/19552879)