Results 1 to 8 of 8

Thread: How can VBA fill-in web form??

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    VBAX Master stanl's Avatar
    Joined
    Jan 2005
    Posts
    1,141
    Location
    ' WHAT HAPPENS AFTER THE WEB_BASED report is RUN (takes about 60 seconds)
    ' is that a dialog box appears and asks where to SAVE the excel file.

    ' HOW can this step be automated as well?
    Not so sure how easy this is in VBA, but I do a similar task each day for 13 different sites, but not using VBA

    After a click() is sent to the download button, I present a 'pause' message that says "Waiting for File Download Window - click if it is present", and this pauses for 2 minutes, if a user is running the script they can click the message if the download window appears prior to the 2 minutes.

    Then you have to look for the window. In VBA, I imagine something like

     
    Set objShell = CreateObject("Shell.Application").
    For Each obj In objShell.Windows
        text = obj.title 
        If Instr(text,"File Download")
    I then sendkeys to this window if it exists, (it will either be 3 enter keys, or 3 tabs and an enter key, depending on the Version of Windows and Version of IE).

    This will bring up a Save As Window - and the sendkeys are 2 tabs and enter. (I also enter a path and specific file name for the download)

    Finally a "Download Complete" - sendkeys 3 tabs and enter.

    But you seem to be saying you are only asked for the Save As. Is it possible for you to post a screenshot of how the popup appears?

    .02 Stan
    Last edited by Aussiebear; 04-12-2025 at 04:26 PM.

Posting Permissions

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