title: VBA to find all CSV files in a Variable Folder name
body: <p>I have a project to create VBA to find and open all CSV files in a folder that is named the current month.  I found some stuff online that seemed close but not quite.  They will eventually be converted to XLSX files and parsed. That part I have.  The macro that converts, parses and saves will be housed in a different file along the same path but not as "deep".</p>
  
  <p>So on my Desktop is a folder name "CSV find  test".  Inside are two folders "Feburary" and "March".  I need it to open all csv files in the most recent month.  I have the rest of the syntax. . . . . </p>
  
  <p>I wouldn't imagine that it would take a huge amount of syntax.  Thanks for any direction.</p>
  
  <pre><code>Sub OpenFile()
  
      FileMonth = Month(Date)
      FileDate = Format(Date, "mmmm")
      FilePath = "C:\Users\Me\Desktop\CSV find convert tests\" &amp; FileMonth &amp; "\" &amp; FileDate &amp; ".xls"
  
      Workbooks.Open Filename:="FilePath" &lt;- - -  - error happens here.
  
  End Sub
  </code></pre>