+ Reply to Thread
Results 1 to 4 of 4

Run-Time error 13: type Mismatch Help!

  1. #1
    Registered User
    Join Date
    10-02-2011
    Location
    Provo, UT, USA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Run-Time error 13: type Mismatch Help!

    Hi everyone,

    Thanks in advance for any help someone can give me. I am having an error that I can't quite get a handle on. I am getting a run time 13 error on this code:

    Please Login or Register  to view this content.

    It is erroring out on If FirstResultASIN = ProductData(2) Or ProductData(3) Then.

    I just pulled the code out to test it as it is part of a much bigger problem. Any ideas on the problem?

    Thanks again for your time.
    Last edited by Leith Ross; 10-28-2011 at 04:30 PM. Reason: Added Code Tags

  2. #2
    Registered User
    Join Date
    10-02-2011
    Location
    Provo, UT, USA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Run-Time error 13: type Mismatch Help!

    I solved it with a select case, but I am still kind of curious about why it would do that in the if statement format. Did I do something weird with the OR?

    Here is the code that fixed it:
    Please Login or Register  to view this content.
    Last edited by Leith Ross; 10-28-2011 at 04:30 PM. Reason: Added Code Tags

  3. #3
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Run-Time error 13: type Mismatch Help!

    I'll answer before you get in trouble for violating rule # 3 of the forum rules.
    Your 2nd "If" should be an "ElseIf". Your code never gets to the 2nd "If" unless the 1st "If" is True.
    Foxguy

    Remember to mark your questions [Solved] and rate the answer(s)
    Forum Rules are Here

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    11,742

    Re: Run-Time error 13: type Mismatch Help!

    The line: If FirstResultASIN = ProductData(2) Or ProductData(3) Then
    Should be:
    Please Login or Register  to view this content.
    Ben Van Johnson

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1