View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default test for "A" or "D"

David,

Try something like

Dim S As String
S = InputBox("Enter A or D")
Select Case UCase(S)
Case "A", "D"
MsgBox "entry OK"
Case Else
MsgBox "entry invalid"
End Select


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"David Turner" wrote in message
...
Using XL2000, I'm trying to validate an InputBox entry:

Col = UCase(InputBox("Column for New Member? A or D", "COLUMN",

"A"))
If Col = "" Then Exit Sub

This gives a strong enough hint to the novice user, but I want

to make it
foolproof and test for "A" OR "D"

How?

--
David