i downloaded this project from codebank link
https://www.vbforums.com/showthread....cDownloadDemo2
when i download one or more the first time it is ok.
after download is finished or running and am trying to download some other file it throws an error at this line.
we already have a download with that localfilename in the list
Code:
Public Sub AddDownloadJob(URL As String, LocalFileName As String, filenamee As String)
Dim NewStripe As ucAsyncDLStripe
Static CC As Currency: CC = CC + 1
Form1.Caption = filenamee
If Dir(App.Path & "\downloaded\" & filenamee) <> "" Then
Form1.Caption = "File exists"
Exit Sub
Else
If Len(GetCtlKeyForLocalFileName(LocalFileName)) Then Err.Raise vbObjectError, , "We already have a Download with that LocalFilename in the List"
If Len(GetCtlKeyForURL(URL)) Then Err.Raise vbObjectError, , "We already have a Download with that URL in the List"
With Controls.Add(GetProjectName & ".ucAsyncDLStripe", "K" & CC)
.Move 0, Controls.Count * .Height, ScaleWidth - VScroll.Width
.Visible = True
VScroll_Change
Set NewStripe = .Object 'just a cast to the concrete Control-Interface
NewStripe.DownloadFile URL, LocalFileName, filenamee 'and here we trigger the Download
End With
End If
End Sub