+ Reply to Thread
Results 1 to 4 of 4

Open webpage & click download button

  1. #1
    Registered User
    Join Date
    08-14-2012
    Location
    Canada
    MS-Off Ver
    Excel 2016
    Posts
    35

    Open webpage & click download button

    Hi,
    On the face, this seems like a trivial thing, but I tried searching the Internet in vain.

    There is a public website. I want VBA to open the webpage and (simulate) click the download button, so that I can then programmatically access the csv file that gets downloaded. I found this code on the Internet, but unfortunately the website does not load properly in IE.

    If I try the Chrome object, it gives me an error - "ActiveX component can't create object" (Is something missing in Preferences?)

    Please Login or Register  to view this content.
    Also, how do I go about accessing the download button? Here is the location of the download button I got from Inspect.

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    08-14-2012
    Location
    Canada
    MS-Off Ver
    Excel 2016
    Posts
    35

    Re: Open webpage & click download button

    I was able to navigate to the web page in Chrome by installing Selenium and using the Chrome driver for Selenium.

    However, I am struggling to narrow down to the download element. Hoping I will be able to progress once I find some more Selenium methods.

  3. #3
    Forum Contributor
    Join Date
    12-10-2013
    Location
    Mississippi, United States
    MS-Off Ver
    2016
    Posts
    120

    Re: Open webpage & click download button

    I am not sure on how to get VBA to interact with a web page ,but if the export is in the same spot every time how about using VBA to mouse click

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    08-14-2012
    Location
    Canada
    MS-Off Ver
    Excel 2016
    Posts
    35

    Re: Open webpage & click download button

    Quote Originally Posted by aworfolk View Post
    I am not sure on how to get VBA to interact with a web page ,but if the export is in the same spot every time how about using VBA to mouse click

    Please Login or Register  to view this content.
    This is cool, thanks. I will make a note of it.

    However, I was able to find the element and click on it through the Selenium code in VBA. But I ran into another problem that it opens a login prompt. If I am already logged in, it doesnt work as this session of Chrome is different (because its controlled by VBA I guess).

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA click button in a webpage
    By Devendra.dvm in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-01-2018, 06:52 AM
  2. Macro to click a 'choose file' button on webpage, browse for a local file, and click open
    By Insaintime32 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-06-2016, 04:46 PM
  3. [SOLVED] Use VBA to Automate Actions on Webpage (Open web page, Select Dropdown, click button)
    By ravikiran in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-03-2015, 07:29 AM
  4. click webpage button problem
    By ckjason in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-01-2013, 03:56 AM
  5. Click "Export" on a webpage is not bringing up File Download box
    By CJK in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-30-2012, 06:45 PM
  6. Click "Export" on a webpage is not bringing up File Download box
    By CJK in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-26-2012, 05:25 PM
  7. [SOLVED] VBA code to 'click' Open in the Open or Save dialogue box on a webpage?
    By bensox in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-31-2012, 05:40 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1