Results 1 to 4 of 4

Run-Time error 13: type Mismatch Help!

Threaded View

  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:

    Option Explicit
    Sub test1()
    Dim FirstResultASIN As String
    Dim ParentSKU As String
    Dim HarvestedASIN1Match As Boolean
    Dim ProductData(3) As String
    Dim productdata2 As String
    Dim productdata3 As String
    
    
    
    FirstResultASIN = "test"
    ParentSKU = "test"
    ProductData(2) = "notest"
    ProductData(3) = "notest"
    
    
    If FirstResultASIN = ParentSKU Then
          HarvestedASIN1Match = True
            If FirstResultASIN = ProductData(2) Or ProductData(3) Then
                HarvestedASIN1Match = True
            Else
                HarvestedASIN1Match = False
            End If
          Else: HarvestedASIN1Match = False
    End If
    
    Debug.Print HarvestedASIN1Match
    
    End Sub

    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

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