System Error &H80010108 (-2147417848). The object invoked has disconnected

  • Hello!

    I've developed a macro that scrapes the amazon website to know whether or not an ebook is part of their Kindle Unlimited program based on an ID. Given there are several different marketplaces (.com, .de, .fr etc...), I created a dropdown menu to choose the marketplace you want to check on. Based on these elements, it creates a concatenated link that it scrapes for a certain HTML element. Here's an example of a link:

    Here's the code:

    [/SIZE]Sub KU_Availability()Application.ScreenUpdating = FalseSet IE = New InternetExplorerMediumIE.Visible = FalseDim i As IntegerLastRow = Range("A" & Rows.Count).End(xlUp).RowFor i = 3 To LastRow   IE.navigate "" & Application.Workbooks("KU Availability hunter").Worksheets("sheet1").Range("B1").Value & "/dp/" & Worksheets("sheet1").Cells(i, 1).Value   DoDoEventsLoop Until IE.readyState = READYSTATE_COMPLETEDim doc As HTMLDocumentSet doc = IE.documentOn Error Resume NextIf Application.Workbooks("KU Availability hunter").Worksheets("sheet1").Cells(1, 2).Value = ".fr" ThenApplication.Workbooks("KU Availability hunter").Worksheets("sheet1").Cells(i, 2).Value = Trim(doc.getElementById("KU_logo"))ElseApplication.Workbooks("KU Availability hunter").Worksheets("sheet1").Cells(i, 2).Value = Trim(doc.getElementById("kuBadge")) End If Next i IE.QuitMsgBox ("Finished.")Columns("B:B").SelectSelection.Replace What:="[object HTMLImageElement]", Replacement:="Yes", _    LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:= _    False, ReplaceFormat:=FalseApplication.ScreenUpdating = TrueEnd Sub[size=14]


    The thing I find extra odd is that this runs perfectly when I choose marketplaces .com,, .de and .fr.
    However, trying with these: .ca, .es, .it, .cn,,,, .in, .nl

    Two Things happen:
    1. IE opens to the correct page it's supposed to scrape despite "IE.Visible = False". This doesn't happen with the working marketplaces.
    2. I get the error in title.

    I've looked at all the articles on Stackoverflow I could find on the matter and can't seem to find a definite answer. I did find a MS page ( that encourages the use of "Option Explicit" but I tried and got the same results. Any ideas?

    Thank you all.

  • Re: System Error &H80010108 (-2147417848). The object invoked has disconnected

    From the Amazon "Conditions of use" page:


    This license does not include any resale or commercial use of any Amazon Service, or its contents; any collection and use of any product listings, descriptions, or prices; any derivative use of any Amazon Service or its contents; any downloading, copying, or other use of account information for the benefit of any third party; or any use of data mining, robots, or similar data gathering and extraction tools

    As Amazon don't permit scraping, the thread will be closed.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!