Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6583981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:28:49+00:00 2026-05-25T16:28:49+00:00

I want to read web pages using Excel VBA. How do I carry out

  • 0

I want to read web pages using Excel VBA. How do I carry out this task? Is it even possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T16:28:49+00:00Added an answer on May 25, 2026 at 4:28 pm

    Coming from Excel 2003, yes this is possible – you may use the SHDocVw.InternetExplorer and MSHTML.HTMLDocument objects to call a web page, gain control over and interact with the DOM object. After creating references to Microsoft HTML Object Library (…\system32\MSHTML.TLB) and Microsoft Internet Control (…\system32\ieframe.dll) you can play with the following example:

    Sub Test()
    Dim Browser As SHDocVw.InternetExplorer
    Dim HTMLDoc As MSHTML.HTMLDocument
    
        Set Browser = New SHDocVw.InternetExplorer                     ' create a browser
        Browser.Visible = True                                         ' make it visible
        Application.StatusBar = ".... opening page"
        Browser.navigate "http://www.google.com"                       ' navigate to page
        WaitForBrowser Browser, 10                                     ' wait for completion or timeout
    
        Application.StatusBar = "gaining control over DOM object"
        Set HTMLDoc = Browser.document                                 ' load the DOM object
        WaitForBrowser Browser, 10
    
        ' at this point you can start working with the DOM object. Usefull functions are
        ' With HTMLDoc
        '     .getElementByID(string)
        '     .getElementsByTagName(string)
        '     .getElementsByName(string)
        '     .getAttribute(string)
        '     .setAttribute string, string     .... to change field values, click a button etc.
        ' End With
    
        Application.StatusBar = ""                                      ' time to clean up
        Browser.Quit
        Set HTMLDoc = Nothing
        Set Browser = Nothing
    End Sub
    
    Sub WaitForBrowser(Browser As SHDocVw.InternetExplorer, Optional TimeOut As Single = 10)
    Dim MyTime As Single
    
        MyTime = Timer
        Do While Browser.Busy Or (Timer <= MyTime + TimeOut)
            DoEvents
        Loop
    
        ' if browser still busy after timeout, give up
        If Browser.Busy Then
            MsgBox "I waited for " & Timer - MyTime & " seconds, but browser still busy" & vbCrLf & _
                   "I give up now!"
            End
        End If
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using MVC and want to put my JSP pages in WEB-INF to avoid
I want to read web service data from a website and display it into
I want to read a file from a java web application. I don't want
I want to write a program in C/C++ that will dynamically read a web
I want to read and write from serial using events/interrupts. Currently, I have it
Hi I want to read the content of a web page that contains a
I'm trying to lay out a web page like this: |-----------------------| | header (fixed)
I am using the Selenium 2 Java API to interact with web pages. My
I am building a social web application using Java and Cassandra DB. I want
Possible Duplicate: 'Like' a page using facebook graph api I want to let users

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.