ie Object in VBA

Posted on 2009-02-15
Last Modified: 2013-11-25
Hi to everybody,
in VBA I nedd to extract from this page

the URL of the image and the item's description.

I've fumbled with ie Object but I couldn't extract the html I need. Below are the few lines I've put together; I couldn't find a complete documentation about the properties of HTMLDocument.
Thanks for any help
Dim ie As Object


Set ie = CreateObject("InternetExplorer.Application") 'Need a reference to Microsoft Internet Controls


With ie

.MenuBar = 1

.Toolbar = 1

.StatusBar = 1

.Navigate ""

.Visible = 1

End With


'wait a while until IE as finished to load

Do While ie.busy




Dim HTMLDoc As HTMLDocument   'Need a reference to Microsoft HTML Object Library

Set HTMLDoc = ie.Document

Dim Elm As IHTMLElement 'Object

For Each Elm In HTMLDoc.all

   Debug.Print Elm.tagName 

' *** And NOW?? ***


Open in new window

Question by:VBAstuff
    1 Comment
    LVL 28

    Accepted Solution

    Don't use the IE object, use XMLHTTP
    Function ReadUrl(ByVal sUrl)
        Dim oXMLHttpRequest
        Set oXMLHttpRequest = CreateObject("Microsoft.XMLHTTP")
    "GET", sUrl, False
        ReadUrl = oXMLHttpRequest.responseText
        Set oXMLHttpRequest = Nothing
    End Function

    Open in new window


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    A short article about problems I had with the new location API and permissions in Marshmallow
    If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now