+ Reply to Thread
Results 1 to 8 of 8

IE Automation - How to update input element and update

  1. #1
    Forum Contributor
    Join Date
    07-16-2007
    MS-Off Ver
    Excel 2003 and Excel 2016
    Posts
    178

    IE Automation - How to update input element and update

    Can I post HTML code here? Is there a way that I can?

    Without posting any code, here's my question to start. I'm navigating to a URL and loading a browser page that has a 'Download' button on it. Using VBA, and information that I can get from inspecting the document element, how do I activate that button and then initiate an 'Open' or 'Save' on the subsequent dialogue window to get the download data? Sorry if this is too cryptic and short, but I want to start somewhere to get a chat going. Thanks.
    Last edited by sumdumgai; 12-04-2017 at 08:35 PM.

  2. #2
    Forum Contributor
    Join Date
    11-04-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    334

    Re: IE Automation - How to update input element and update

    If the button is a click button then your code will need to button.click or if it is a submit button then your code will need to button.submit

    Activating the download button will open the IE notification frame...manipulating the IE notification frame with VBA is beyond my ability but certainly do-able.

  3. #3
    Forum Contributor
    Join Date
    07-16-2007
    MS-Off Ver
    Excel 2003 and Excel 2016
    Posts
    178

    Re: IE Automation - How to update input element and update

    Thanks. What if it is just a hyperlink; i.e., highlighted text which when clicked, opens the IE notification frame?

  4. #4
    Forum Contributor
    Join Date
    11-04-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    334

    Re: IE Automation - How to update input element and update

    Getting the notification frame to open is the easy bit, if it is just a link then you can just follow the hyperlink. Find the element that holds the hyperlink and navigate the URL.


    Here is an example what you need to do once the frame notification bar opens.
    https://stackoverflow.com/questions/...ar-save-button

  5. #5
    Forum Contributor
    Join Date
    07-16-2007
    MS-Off Ver
    Excel 2003 and Excel 2016
    Posts
    178

    Re: IE Automation - How to update input element and update

    OK, so I managed to find the download link and execute it. The data downloads as an CSV file and I convert to columns and then select cell(1,1). However, I cannot find a way to give control back to the workbook that initiated the IE session and caused the download. Here's a bit of the relevant code:
    Please Login or Register  to view this content.
    How can I get back to the original workbook? Also, if you see any improvements or mistakes in the code, please advise.
    Thanks.
    Last edited by sumdumgai; 12-09-2017 at 12:20 PM.

  6. #6
    Forum Contributor
    Join Date
    11-04-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    334

    Re: IE Automation - How to update input element and update

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    07-16-2007
    MS-Off Ver
    Excel 2003 and Excel 2016
    Posts
    178

    Re: IE Automation - How to update input element and update

    Thanks, anrichards22, but your suggestion doesn't work either. Before manipulating the downloaded book, I activate the initiating book. After manipulating the downloaded data using a 'With', with the initiating book window open, I still cannot execute a floow up command.
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    11-04-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    334

    Re: IE Automation - How to update input element and update

    Try using the actual name of your workbook

    Workbooks("XYZ.xlsx").activate

+ 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. Pricelist update automation possible
    By Swedish in forum Excel General
    Replies: 3
    Last Post: 08-13-2016, 07:23 AM
  2. hyperlink generator & update & new entry automation.
    By maheshwow in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-11-2012, 10:53 AM
  3. Pivot table-update the element in the array and stop other elements changing
    By zaalhy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-20-2008, 10:42 AM
  4. SP2 update causes automation crashes
    By news.microsoft.com in forum Excel General
    Replies: 8
    Last Post: 03-07-2006, 04:00 PM
  5. [SOLVED] Office SP2 update causes Excel automation crash!
    By Rob Schripsema in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-27-2006, 08:20 PM
  6. [SOLVED] Automation to update 288 ranges?
    By [email protected] in forum Excel General
    Replies: 1
    Last Post: 07-12-2005, 07:05 PM
  7. Excel formula update automation off
    By Mdlf in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-27-2005, 07:53 AM

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