The sub DownloadPimDoc is called. The Openbrowser opens a basic link to the website which automatically logs in. The Openbrowser2 then goes to the specific download link to start the download. I will later on use the file in VBA but download time varies depending on the server.
Is there a more efficient way to download the file via the browser using VBA?
Sub DownloadPIMDoc(url As String)
Call OpenBrowser
Application.Wait Now + TimeValue(WaitTime)
Call OpenBrowser2(url)
End Sub
Sub OpenBrowser()
Dim url As String
url = "https://website.com"
' Open the URL in the default web browser
ThisWorkbook.FollowHyperlink Address:=url
End Sub
Sub OpenBrowser2(specificUrl As String)
Dim url As String
url = specificUrl
' Open the URL in the default web browser
ThisWorkbook.FollowHyperlink Address:=url
Application.Wait Now + TimeValue(WaitTime)
End Sub