error 13 type mismatch input box

C

cluckers

I am getting an error 13 type mismatch on line "If Not comtypeeq = "C" Or "P"
Or "" Then"

can you help?

Thanks

Code:
Dim comovrdeq As String
Dim comtypeeq As String
Dim comovrdmf As String
Dim comtypemf As String

commissionadjust:

If MsgBox("Do you want to discount the commissions?", vbYesNo) = vbYes Then
comtypeeq = InputBox("Enter override type: cents/share = C; Percent
discount= P; dollar amount/trade = leave blank")


If Not comtypeeq = "C" Or "P" Or "" Then
MsgBox ("You did not select a valid discount. Try Again")
Else
 
J

JLatham

You have to be explicit with each test:

If comtypeeq<> C" and comtypeeq <> "P" And comtypeeq<>"" Then
....
Else
....
End IF
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top