J
Joanne Toone
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
... 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