Dir function does not find a file, even after copy pasting the path as a parameter
<p>I've tried to get the Dir() function to work some time now using a rather complicated concatenated string, as seen below:</p>

<pre><code>  Dim Path as String

  Path = Dir("PathToSubfolder\" &amp; Year(Date) &amp; "\" &amp; MonthName(Month(Date)) &amp;  _ 
                             "\Production " &amp; MonthName(Month(Date)) &amp; "*.xlsx")
  MsgBox Path
</code></pre>

<p>The message box prints nothing (it's just a blank Message Box). After trying to figure out whether I had mistyped the Path somehow, I opened up the correct file, and copypasted its actual Path from options, and subsequently performed: <code>Path = Dir("PathToSubFolder\2016\June\Production June 2016.xlsx")</code>, i.e. without any concatenation or anything, simply just the actual filepath and -name. However, Printing <code>MsgBox Path</code> returned nothing (NULL) again. </p>

<p>Does anyone have any clue as to why this wont work? I have used Dir quite extensively the last days from the same workbook (albeit not from the same module) without any issues. </p>

<p>Edit: Finally found a workaround. I simply made a variable with the path to the file, <code>pathtoFile</code>, and subsequently:</p>

<pre><code>Dim pathtoFile As String 
pathtoFile = "C:\Path.to.file\"
Path = Dir(pathtoFile &amp; "*" &amp; MonthName(Month(Date)) &amp; "*")
</code></pre>