title: Excel macro to open file with partial filename
body: <p>I have tried looking on various forums and cannot seem to find a solution that fits my needs.</p>
  
  <p>I have a file "BABERs FORMULAS - 24 Jan 2017 - Rev 079 11-27.xlsm". I use a macro to save the changes to the file which adds the date, revision number and timestamp to the filename. The file is located at the following path "D:\FORMULAS".</p>
  
  <p>The macro I have is as below but this then gives me a Run-time error '1004' and says to check that the spelling of the file name and verify the location is correct.</p>
  
  <pre><code>Dim fname as Variant
  fname = Dir("D:\FORMULAS\BABERs FORMULAS*")
  
  If fname &lt;&gt; "" then
      Workbooks.open (fname)
  End If
  </code></pre>
  
  <p>Any ideas where I could be going wrong? Any assistance would be appreciated.</p>