RTE 76 doesn't want to be caught for some reason. Some one mind helping with the problem?
My Code
Please helpCode:Public Sub DownloadFile(ByVal URL As String, ByVal Path As String) Dim fBytes() As Byte Dim fileNum As Long On Error GoTo Err fBytes() = Form1.inetDownload.OpenURL(URL, icByteArray) If FileExists(Path) Then Kill (Path) start: fileNum = FreeFile Open Path For Binary Access Write As #fileNum Put #fileNum, , fBytes() Close #fileNum Exit Sub Err: If Err.Number = 76 Then Call MkDir(Mid$(Path, 1, Len(Path) - InStrRev(Path, "/", , vbTextCompare))) Err.Clear start End If End Sub
P.S Typed an informative txt. Browser crashed. Don't feel like doing it again. But if you didn't understand I'll be glad to expand then.




Reply With Quote