Results 1 to 2 of 2

Thread: [RESOLVED] download error on this codebank project

  1. #1

    Thread Starter
    Banned
    Join Date
    Jun 2022
    Posts
    149

    Resolved [RESOLVED] download error on this codebank project

    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

  2. #2
    Hyperactive Member
    Join Date
    Jun 2016
    Location
    EspaƱa
    Posts
    506

    Re: [RESOLVED] download error on this codebank project


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