none
Error Method 'document' of object 'IWebBrowser2' failed RRS feed

  • Question

  • I am starting the process of creating a function that will, hopefully, extra data from a webpage and place it onto a field on a form in Access 2010. I have created a very basic function to test out some code and receiving the above referenced error message. I do no understand why I'm receiving the error nor how to trouble shoot.

    The error is for " Debug.Print ie.Document.all.tags(“A”).Item(0).outerHTML "

    Below is my code in its entirety.

    Public Function GetData()

    Dim ie As Object
    Set ie = CreateObject("InternetExplorer.application")

    ie.Visible = True

    ie.navigate "(url would normally go here / redacted for public consumption)"

    While ie.busy
        DoEvents
    Wend

    Debug.Print ie.Document.all.tags(“A”).Item(0).outerHTML

    End Function

    • Moved by Marvin_Guo Friday, February 28, 2014 1:23 AM
    Wednesday, February 26, 2014 11:24 PM

All replies