Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,203
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Basic Error Run Time Error, Type Mismatch Meg Partridge Excel Discussion (Misc queries) 12 September 10th 08 06:10 PM
Type Mismatch Error Minitman Excel Discussion (Misc queries) 7 June 21st 08 02:15 AM
Type Mismatch Error - Help Please Launchnet Excel Worksheet Functions 5 July 20th 07 04:35 AM
Type Mismatch Error David Excel Discussion (Misc queries) 2 December 11th 05 04:46 PM
Why type mismatch - R/T error 13 Jim May Excel Discussion (Misc queries) 5 January 9th 05 06:45 PM


All times are GMT +1. The time now is 11:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"