|
-
May 22nd, 2000, 02:21 AM
#1
Thread Starter
New Member
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
-
May 22nd, 2000, 12:46 PM
#2
Lively Member
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
-
May 22nd, 2000, 08:06 PM
#3
Thread Starter
New Member
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?
-
May 24th, 2000, 01:52 PM
#4
Lively Member
Are you add to Internet Transfer Control in that Form what you load.
- Dj4
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|