jrwrangler
New Member
- Joined
- Mar 22, 2013
- Messages
- 16
I am using an input box with select case. I want it to let values that are under 100 and end in a zero to proceed to a msgbox that offers a reminder. For Any values that do not have a zero as the second digit to pop up an error message that lets them retry by going through the code again. When I enter values like 123 it still proceeds. Values like 12 gives me the first message box. I don't know why this is
ReTryIt2:
NumShares = Application.InputBox(prompt:="Please Enter The TOTAL Number of Shares Being Covered Today: " Title:="Shares Being Covered TODAY")
Select Case NumShares
Case Is < 100 And Mid(NumShares, 2, 1) = 0
MsgBox ("Ok, Looks Good.....")
Case Mid(NumShares, 2, 1) <> 0
MsgBox ("This Is An Invalid Entry.Please Retry")
GoTo ReTryIt2
End Select
Code:
NumShares = Application.InputBox(prompt:="Please Enter The TOTAL Number of Shares Being Covered Today: " Title:="Shares Being Covered TODAY")
Select Case NumShares
Case Is < 100 And Mid(NumShares, 2, 1) = 0
MsgBox ("Ok, Looks Good.....")
Case Mid(NumShares, 2, 1) <> 0
MsgBox ("This Is An Invalid Entry.Please Retry")
GoTo ReTryIt2
End Select
Code: