View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernard Liengme Bernard Liengme is offline
external usenet poster
 
Posts: 4,393
Default Case Sensitive Input Box

Hard to give complete answer without seeing your code.

Have the first three letters of the input box text converted to uppercase
with
mytext=Mid(Ucase(text_from_input_box),1,3)
Then compare mytext to JAN, FEB .... to return JANUARY, FEBRUARY
using maybe a Select Case structure
Select Case mytext
Case "JAN" : the-month = "JANUARY"
Case "FEB" : the-month = "FEBRUARY"

Or by using arrays and an index
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Keep It Simple Stupid" wrote
in message ...
I have an input box for the user to enter the full name of the month for
the
report. Then there is a whole slew of code that follows. The value is
then
entered into the sheet, and I have formulas that look for this value.

Unfortunately, if the user does not enter the entire name of the month and
in all caps, it doesn't work.

How can I make it so I have some kind of error-checker. For example, if
the
users enters january, January, or JANYOUARIE then the code will stop, but
if
the user enters JANUARY, FEBRUARY, MARCH, ... etc, then the code
continues.
I cant figure out the if/then/else