-
I'm having some trouble running the code below. I'm getting a Runtime Error #424. Object required. (on the Inet1.Cancel Line).
I haven't done much with VB and am having some problems writing what seems to me to be a simple program. I'm trying to use the Inet OpenUrl to download a text file on a Cern FTP server.
Any help you could offer would be greatly appreciated.
Private Sub Form_Load()
Dim b() As Byte
'Cancel any operations
Inet1.Cancel
'Set protocol to HTTP
Inet1.Protocol = icHTTP
'Set the URL Property
Inet1.URL = "http://www.microsoft.com"
'Retrieve the HTML data into a byte array.
b() = Inet1.OpenURL(, icByteArray)
'Create a tempory file for the page to reside
Open "c:\emp\emp.htm" For Binary Access Write As #1
Put #1, , b()
Close #1
End Sub
-
Cancel method is not working good. Are you try using without Cancel method. Or change code like this:
Inet1.Cancel
Do
Inet1.Cancel
DoEvents
Loop While Inet1.StillExecuting
- Dj4
-
Thanks, but I'm still getting errors on the next occurance of Inet1. Do I need to declare Inet1 some where or include the inet library?
-
Are you add to Internet Transfer Control in that Form what you load.
- Dj4