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