have an excel file that has multiple records around 5k with urls. I need to go through each record having url and enter it on the browser click on menu->hit download(zip file) and save it on my local folder.
Every time I open this url, it asks for login credentials. I'm not quite sure how to automate this.
However I used URLDownloadToFile declaration.It doesnt seem to work, not sure how to surpass the login page
Option Explicit
#If VBA7 Then
Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, _
ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
#Else
Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, _
ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
#End If
Sub DownloadFileFromWeb()
DownloadFileFromWeb = URLDownloadToFile(0, "http://mouseflow/MyFile.zip", "C:\Temp", 0, 0)
End Sub