title: Excel VBA Open a Folder
body: <p>Using 2010 Excel VBA - I'm just trying to open a folder through a sub. What am I doing wrong here?</p>
  
  <p>VBA</p>
  
  <pre><code>Sub openFolder()  
    Dim preFolder As String, theFolder As String, fullPath as String
  
      theFolder = Left(Range("T12").Value, 8)
      preFolder = Left(Range("T12").Value, 5) &amp; "xxx"
      fullPath = "P:\Engineering\031 Electronic Job Folders\" &amp; preFolder &amp; "\" &amp; theFolder
  
      Shell(theFolder, "P:\Engineering\031 Electronic Job Folders\" &amp; preFolder, vbNormalFocus)
  
  End Sub
  </code></pre>