Hi there folks! I have a list of schoolwork that I would like the students to work on at home, the list of school work is in a listbox called DownloadList

I loaded the list list like this...

Public Sub LoadTheWorkList()
'This code will load the WorkToDo.txt to the listbox so the program can download all of the files needed for the day.
Dim ff As Long
Dim line As String
ff = FreeFile
Open App.Path & "\ResourceFiles\WorkActivities" & Desk.lblDate.Caption & "\WorkToDo.txt" For Input As #ff

Do While Not EOF(ff)
Line Input #ff, line
'make sure we're not adding a blank line

If Len(line) Then DownloadList.AddItem line

Loop
Close #ff
End Sub

What I would like to do is an item is loaded into the listbox, to download it from a website. Up until now, I have been using this code to download files one at a time, which does work.

VB Code:
  1. Dim sSourceUrl As String
  2.    Dim sLocalFile As String
  3.    Dim hfile As Long
  4.    
  5.    sSourceUrl = "http://microhardxce.com/WeeklyNewsletters/WeeklyNewsletter-" & Desk.lblDate.Caption & ".pdf"
  6.    sLocalFile = App.Path & "\ResourceFiles\WorkActivities\WeeklyNewsletters\WeeklyNewsletter-" & Desk.lblDate.Caption & ".pdf"
  7.    
  8.    Label1.Caption = sSourceUrl
  9.    Label2.Caption = sLocalFile
  10.    
  11.    If DownloadFile(sSourceUrl, sLocalFile) Then
  12.    
  13.      hfile = FreeFile
  14.       Open sLocalFile For Input As #hfile
  15.       On Error Resume Next
  16.         Text1.Text = Input$(LOF(hfile), hfile)
  17.         If Err Then
  18.         Else
  19.         End If
  20.       Close #hfile
  21.      
  22.    End If

Essentially what I'm trying to do is as each item is loaded into the listbox is downloaded. The listbox doesn't have many files, maybe 5 at the most.
Would anyone know how to do that? Thanks!