Hello,
I'm using VBA in Excel 2016.
I have a download function in my Excel Macros that looks like this:
Public Function Downl(downloadedNovatechImagesAndFilename, imageURI)
Dim xhttp As MSXML2.XMLHTTP
Set xhttp = New MSXML2.XMLHTTP
Dim oFile As Integer
Dim bdata() As Byte
With CreateObject("Scripting.FileSystemObject")
If Not .FolderExists(downloadedNovatechImages) Then .CreateFolder downloadedNovatechImages
End With
xhttp.Open "GET", imageURI, False
xhttp.send
If xhttp.Status = 200 Then
oFile = FreeFile()
Open downloadedNovatechImagesAndFilename For Binary Access Write As oFile
bdata = xhttp.responseBody
Put oFile, 1, bdata
Close oFile
filesDownloadedCounter = filesDownloadedCounter + 1
End If
responseStatus = xhttp.Status
End Function
Where would I ask a question about how to check if download is complete before exiting the If block?
Thanks,
Tony
Stop The World, I want To Get Off! ........... Life Isn't About Waiting For The Storm To Pass ... It's About Learning To Dance In The Rain.