can someone instruct me how to construct/use this event... ive never done it before
\r\n
\r\ni just need to find a way to get the size of the downloaded data.
\r\n
\r\ni can already get the file size before downloading but want to make a progress bar... pb1.value = ubound(data())/tSize * 100
\r\n
\r\nHere is the code im using to download a file:
\r\n
\r\n
Code:
\r\n
Dim WinHttpReq As WinHttp.WinHttpRequest\r\n\r\nPublic Sub DLFile(strHTTPFile As String, strFileDest As String)\r\nSet WinHttpReq = New WinHttpRequest\r\nDim FNum As Integer\r\nFNum = FreeFile\r\n\' Create an array to hold the response data.\r\nDim d() As Byte\r\n\' Assemble an HTTP Request.\r\nWinHttpReq.Open "GET", strHTTPFile, False\r\nWinHttpReq.Send\r\n\' Put response data into a file.\r\nd() = WinHttpReq.ResponseBody\r\nOpen strFileDest For Binary As FNum\r\nPut FNum, 1, d()\r\nClose FNum\r\nNextFile = True\r\nSet WinHttpReq = Nothing\r\nEnd Sub
\r\n
i would like someone to help me make it so i can monitor the size of the data being retrieved for a download progress bar...
\r\n
\r\nthank you in advance...
\r\n \r\n\r\n