Wildcard or Defining Characters(re-phrased)

  • Thread starter Thread starter Dennis
  • Start date Start date
D

Dennis

I'm going to re-write my previous question, I should have provided more
detail.

I have the variable 'x' declared which is entered into a input box…

Dim x As String
x = Application.InputBox("ENTER THE WFL OR OBJECT per the instructions")

It works fine however I would only like it to not accept the '=' sign in the
any of the string OR to only accept the characters a-z A-Z 0-9 and the '/'
character. Either would accomplish my goal.

TIA
Dennis
 
Perhaps:


Const MSG As String = _
"ENTER THE WFL OR OBJECT per the instructions"
Dim x As Variant
Do
x = Application.InputBox(MSG)
If x = False Then Exit Sub 'User Cancelled
Loop Until (Len(x) > 0) And (InStr(x, "=") = 0)
MsgBox x
 
Back
Top