title: How do I add a loop to go through folders to this code?
body: <p>by looking at other people's code and modifying it, I managed to piece together this piece of code:</p>
  
  <pre><code>Sub LookForNew()
  Dim n As String, msg As String, d As Date
  msg = ""
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set fils = fso.GetFolder(Range("B4")).Files
  For Each fil In fils
      n = fil.Name
      d = fil.DateCreated
      If d &gt;= Range("E1") Then
          msg = msg &amp; n &amp; vbTab &amp; d &amp; vbCrLf
          Range("C4") = Range("B1")
      End If
  Next fil
  If msg = "" Then
      MsgBox "No new files"
      Range("C4") = Range("B1")
  Else
      MsgBox msg
  End If
  Set fso = Nothing
  End Sub
  </code></pre>
  
  <p>This loops through the files in the folder (Path is in "B4"). If there are filers newer than the date given in "E1", it returns an alert. </p>
  
  <p>What I would like to add to this is a loop that loops through all the folder paths given in the range "B4:B22" and repeats the above actions for each file in these folders. So far I have only run into errors...</p>