Results 1 to 20 of 21

Thread: VBA to Download documents using URLs & Save As to folder

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #14
    VBAX Regular
    Joined
    Oct 2017
    Posts
    10
    Location
    HI Kenneth,

    I've done right click and inspect element to look at the code and I can't find any .xlsx documents or anything similar.

    I did play around with the following code a while ago but couldn't get the "readystate" check to work so had to get the macro to pause until the report loaded and again when it was opening. The only part I couldn't master was saving it down and replacing the previous version.

    Sub Open_URL()
        Do
            Dim ieDoc As Object
            Dim Report As Variant
            Set ie = CreateObject("Internetexplorer.Application")
            ie.Visible = True
            ie.Navigate Sheets("Reports").Range("A1").Value
            Application.Wait (Now + TimeValue("00:00:20"))
            Application.SendKeys "{Enter}"
            Application.Wait (Now + TimeValue("00:00:20"))
            If IsEmpty(ActiveCell) Then
                Exit Do
            End If
        Loop
    End Sub
    Last edited by Aussiebear; 03-12-2025 at 08:06 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
  •