Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
error 13 type mismatch input box
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 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
error 13 type mismatch input box
You have to be explicit with each test:
If comtypeeq< C" and comtypeeq < "P" And comtypeeq<"" Then .... Else .... End IF "cluckers" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Visual Basic Error Run Time Error, Type Mismatch | Excel Discussion (Misc queries) | |||
Type Mismatch Error | Excel Discussion (Misc queries) | |||
Type Mismatch Error - Help Please | Excel Worksheet Functions | |||
Type Mismatch Error | Excel Discussion (Misc queries) | |||
Why type mismatch - R/T error 13 | Excel Discussion (Misc queries) |