Results 1 to 4 of 4

Thread: inet runtime error

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2000
    Posts
    2
    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

  2. #2
    Lively Member
    Join Date
    Jan 1999
    Location
    Karjalohja, Finland
    Posts
    123
    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

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2000
    Posts
    2
    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?

  4. #4
    Lively Member
    Join Date
    Jan 1999
    Location
    Karjalohja, Finland
    Posts
    123
    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
  •  



Click Here to Expand Forum to Full Width