Thanks, I'll give it a shot. Is that just any of the MS XML Libraries?

Most of my code was for the user form and reporting the status. The
downloads are over a fairly slow VPN connection, and some of the files
are approaching 100MB, so the status reporting is helpful.

Is there a way to retrieve the file size from HTTP headers using this
code?




Tim Williams wrote:
> You could try this instead. A bit less code....
> Tim
>
> ****************************************
> Sub DownloadFile(sURL As String, sPath As String)
>
> Dim oXHTTP As Object
> Dim oStream As Object
>
> Set oXHTTP = CreateObject("MSXML2.XMLHTTP")
> Set oStream = CreateObject("ADODB.Stream")
>
>
> oXHTTP.Open "GET", sURL, False
> oXHTTP.send
>
> oStream.Type = adTypeBinary
> oStream.Open
> oStream.Write oXHTTP.responseBody
> oStream.SaveToFile sPath, adSaveCreateOverWrite
> oStream.Close
>
> Set oXHTTP = Nothing
> Set oStream = Nothing
>
> End Sub
> ******************************************
> --
> Tim Williams
> Palo Alto, CA
>