I am trying to download a file with save as through the frame notification bar of internet explorer. However after doing a lot of searches, I have only foun
I tried simply to download a file by the link http://www.tvsubtitles.net/download-114117.html, which can be found on the webpage http://www.tvsubtitles.net/subtitle-114117.html, and it worked for me, here is the code:
Sub Test_download_tvsubtitles_net()
DownloadFile "http://www.tvsubtitles.net/download-114117.html", ThisWorkbook.Path & "\download-114117.zip"
End Sub
Sub DownloadFile(sUrl, sPath)
Dim aBody
With CreateObject("MSXML2.XMLHTTP")
.Open "GET", sUrl, False
.Send
aBody = .responseBody
End With
With CreateObject("ADODB.Stream")
.Type = 1 ' adTypeBinary
.Open
.Write aBody
.SaveToFile sPath, 2 ' adSaveCreateOverWrite
.Close
End With
End Sub