Joanne,
You can do a
If var < value Then
so if you want to test for something other than the list you give then
If ans < "None" Then
as an example
You can also use Like
If ans Like "M*" Then
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Joanne Toone" wrote in message
...
I was wondering if you can do an if statement that says "if input isn't
.. then ...". Below is the code im trying to sort out, and i think
you'll understand once you see it!
ActiveCell.Offset(0, 1).Range("A1").Select
ans = Application.InputBox("Enter the customer title: ", _
"Customer Title", Type:=2) ' Type 2 for a text entry
If ans = "Miss" Or ans = "Mr" Or ans = "Ms" Or ans = "Mrs"
Then
MsgBox "Please input an appropriate title", vbOKOnly +
vbCritical, "Incorrect Input"
Application.Run "InputMe"
Exit Sub
End If
ActiveCell.Offset.Range("A1") = ans
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!