Results 1 to 10 of 10

Thread: What is wrong with my downloads class??

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member RS_Arm's Avatar
    Join Date
    Mar 2007
    Location
    Planet Earth
    Posts
    282

    Angry What is wrong with my downloads class??

    I've created an app to download multiple files from internet. To be more fast, I've created also an ActiveX EXE only to download the files.

    I send the file origin and file destination to the Class (ActiveX EXE).

    This is my form code:
    Code:
    Private Sub Command1_Click()
    
    Dim i As Integer
    Dim Download() As DownloadClasse.Internet
    
    
    Me.ProgressBar1.Max = Me.MSHFlexGrid1.Rows - 1
    ReDim Download(Me.MSHFlexGrid1.Rows - 1)
        
        
    For i = 1 To Me.MSHFlexGrid1.Rows - 1
        Set Download(i) = New DownloadClasse.Internet
        Download(i).DownloadFich Me.MSHFlexGrid1.TextMatrix(i, 0), Me.MSHFlexGrid1.TextMatrix(i, 1)     'send the filename to
    
        Me.ProgressBar1.Value = i
        Set Download(i) = Nothing
        
    Next i
    
    Me.ProgressBar1.Value = 0
    
    End Sub
    This is the class

    Code:
    Option Explicit
    Public Function DownloadFich(ArqURL As String, Arqtemp As String)
    
    Dim arquivo() As Byte
    Dim Inet1 As Inet
    
    Open Arqtemp For Binary Access Write As #1
    
    arquivo() = Inet1.OpenURL(ArqURL, icByteArray)
    Put #1, , arquivo()
    
    Close #1
    
    End Function
    I get the 91 error!
    I know that it is a nasty simple error but, what am I doing wrong???
    Last edited by RS_Arm; Aug 28th, 2007 at 03:51 PM.

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