title: Invalid outside procedure
body: <p>I want to store a path in string "path" which would be available for the whole workbook.</p>
  
  <p>When I do it the following way, I get an error:
  "invalid outside procedure"</p>
  
  <p>Here is how I am trying to declare the path in (General) (Declaration)</p>
  
  <pre><code>Option Explicit
  Dim path As String
  
   path = "\\sharedDrive\TestFolder\Test_PDF\"
  </code></pre>
  
  <p>I get the error at: </p>
  
  <pre><code>"\\sharedDrive\TestFolder\Test_PDF\"
  </code></pre>