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:
This is the classCode: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
I get the 91 error!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 know that it is a nasty simple error but, what am I doing wrong???![]()




Reply With Quote