Retrieve Data from Website in Microsoft Access or Excel using VBA

File Download: Microsoft Access/VBA Sample File

Edit: 7/23/2017 – an improvement to this solution. This will require some refactoring.

A week or so ago a reader asked (on this blog post), if we could place the file online that performs the operation in this blog post (and video).

I’ve included it below as a download.

DOWNLOAD: Access Database Example

The download is a zip file.

  1. Download and extract. Open the “pulse-grab-web-data.accdb” file.
  2. Open the form, “frmRetrieveWebData” in design view
  3. Right mouse click the button and select, “Build Event” to see the code
  4. Set a break point if you want to see the code run line by line
  5. View the form in standard (form) view
  6. Press the “Get Web Data” button
  7. When complete, the “tblWebData” table should open.

Note: as of today (9/7/2016) this code runs. If we change our blog or theme, it is likely this will no longer work. Sorry. 😉

COMING SOON: We’ll have an update on connecting Microsoft Access to Quickbooks..

Posted in Consulting, Microsoft Access, Programming, Tips and Tools and tagged , , .


  1. Thank you for the demo, I have done this before but needed to demo to work the concept of Screen Scraping (as such), to find a clear and simple demo already bundled was gold.

  2. Thank you very much, matthew! actually, I have a task to retrieve certain data from several web pages (actually one main page and sub-pages). If you could help me I will be very grateful!!

    • T.Salih, I’m glad you found this helpful.

      How can I help you?

      Are the pages you are retrieving data from always at the same URL?
      Main Page
      Main Page/Subpage1
      Main Page/Subpage2

      for instance:

      As is the data in the same location or otherwise in the same DOM element or id/class?

      If so, it should be fairly simple to make this happen.

Leave a Reply

Your email address will not be published. Required fields are marked *