Internet Explorer was retired last year as a means of downloading automatically website pages with MS Excel/Access codes. My associate and I have not found API access for Edge or Chrome like what existed with IE. Does anyone know a workaround?
Following is how we used IE last year. I use this coding once a year, but it is an essential tool. It is used in conjunction with an Exel spreadsheet. There is a marriage between Excel & Access for my use.
Sub DallasWebSMacro() Dim i As Long Dim LogNoRng As Range: Set LogNoRng = Worksheets("Spreadsheet").Range("B6") Dim StartRow As Long Dim EndRow As Long Dim ie As Object Dim Webloc As String Dim FullWeb As String Set ie = CreateObject("InternetExplorer.Application") Application.Wait (Now + TimeValue("0:00:10")) StartRow = InputBox("Enter the row you want to start on") EndRow = InputBox("Enter the row you want to end on") For i = StartRow To EndRow LogNoRng = Worksheets("Hirschy").Cells(i + 1, 1).Value Dim WSHNetwork As Object Set WSHNetwork = CreateObject("WScript.Network") Dim sFolder As String Dim sFoldercheck As String Application.StatusBar = i
If Dir(sFolder, vbDirectory) = "" Then MkDir sFolder Else End If If Dir(sFoldercheck, vbDirectory) <> "" Then Kill sFoldercheck Else End If Webloc = Sheets("Spreadsheet").Range("B42").Value FullWeb = "https://www.dallascad.org/AcctDetailRes.aspx?ID=" & Webloc With ie
.Visible = True .Navigate FullWeb
Do While .Busy Application.Wait DateAdd("s", 1, Now) Loop
.ExecWB 6, 2 Application.Wait DateAdd("s", 7, Now) Call PDFPrint(sFolder & "\a.pdf") End With Application.StatusBar = "Currently on row " & i Next ie.Quit Application.Wait (Now + TimeValue("0:00:10")) Set ie = Nothing MsgBox "The Macro Has Finished Running", , "Macro Done" Exit Sub End Sub
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Excel Forum.