Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
As you have converted your input to lower case, you must use lower case in
all your comparisons. For example ElseIf tea="chai" Then "Alex" wrote in message ... I'm messing around to get a better understanding of InputBoxes and IF statements and thier it's limits... Here's what I put together.... Dim tea As String Mo tea = LCase(Application.InputBox("Please enter a tea beverage", "Tea Guide")) If tea = "" Then Exit Sub ElseIf tea = "Chai" Then MsgBox ("Good Tea, try something else") GoTo More ElseIf tea = "Green" Then MsgBox ("Great Tea, try something else") GoTo More ElseIf tea = "Black" Then MsgBox ("Better Tea, try something else") GoTo More ElseIf tea = "Herbal" Then MsgBox ("BEST TEA!!!") Else: tea = vbCancel Exit Sub End If "Alex" wrote: Is it possible to have a InputBox ignore the case? CHAIR = chair = Chair = ChAiR = etc...... -- Jack of all trades... master of none.. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
uppercase to lowercase | Excel Discussion (Misc queries) | |||
Lowercase to uppercase | Excel Discussion (Misc queries) | |||
uppercase to lowercase | Excel Worksheet Functions | |||
lowercase to uppercase | Excel Worksheet Functions | |||
uppercase to lowercase | Excel Discussion (Misc queries) |