OK - I've just hit a wall wiht something that should be simple
From an InputBox statement, I need to determine whether the user:
1. Clicked OK but did not enter anything
2. Clicked OK but did not enter a sufficient number of characters
3. Clicked Cancel
Here is how I have been trying to write the code:
[vba]
strInput = InputBox("Enter something greater than 6 characters.")
Select Case strInput
'Check for a blank entry
Case (Len(strInput) = 0)
MsgBox "You must enter something."
'Check that the user entered the minimum length
Case (Len(strInput) < 6)
MsgBox "Your entry must be contain at least 6 characters"
'Check if the user pressed Cancel
Case ""
Exit Function
'If we get here, the string passes
Case other
Msgbox "Good job, you can follow directions!"
End Select
[/vba]
I'm sure the problem is simple. Ideas on what I'm doing wrong?
Thanks,
James