title: VBA - thisworkbook.path
body: <p>I cannot figure out what is wrong with my code.</p>
  
  <p>From a logical perspective, why is it not working (see below)? There is no error message. </p>
  
  <p>Instead, when running the code, a folder opens where I can select manually the file and the tab. </p>
  
  <p>When opening the file and the tab, the correct calculation is done.</p>
  
  <p>However, I would like the macro to do exactly this for me :)</p>
  
  <p>Example code:</p>
  
  <pre><code>*'define macro name*
  Sub macro_additional_indicators()
  
  Dim Path As String
  
  *'define path variable = recent workbook folder*
  
  Path = ThisWorkbook.Path &amp; "\"
  
  *'ignore this*
  
     Cells.Find(What:="Additional Indicators", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
          :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
          False, SearchFormat:=False).Activate
  
      ActiveCell.Offset(1, 3).Select
  
  *'here the thisworkbook.path command is used and*
  
      ActiveCell.Formula = "='Path &amp; [COREP]C 02.00'!$E$19/1000000"
  
      ActiveCell.Offset(1, 0).Select
  
  *'it should substitute the direct path stated here*
  
      ActiveCell.Formula = "='C:\Users\me\Desktop\KRI\[COREP]C 02.00'!$E$19/1000000"
  </code></pre>