title: Running Line of code twice causes activeX error 0x8000ffff
body: <p>Following code causes an ActiveX error 0x8000ffff if executed twice.</p>
  
  <p>It all boils down to this two lines, as the rest of the code runs smoothly.
  In particular, if I run the line of code only once, it works great. If I run the line of code twice I get the error. Note that the line is only reading the variable, so I do not understand why it would not be readable the second time. If s_Var changes, then it works, essentially i can read every column once. </p>
  
  <p>This works:   </p>
  
  <pre><code>         obj_Dlr = GetDataLoggerRecipe(s_Dlr)
           If Not s_Var = "" Then
  
              Debug.Print obj_Dlr.GetColumn(s_Var).Name
  
           End If
  </code></pre>
  
  <p>This not:</p>
  
  <pre><code>         obj_Dlr = GetDataLoggerRecipe(s_Dlr)
           If Not s_Var = "" Then
  
              Debug.Print obj_Dlr.GetColumn(s_Var).Name
              Debug.Print obj_Dlr.GetColumn(s_Var).Name
  
           End If
  </code></pre>
  
  <p>Also reassigning the variable does not work..</p>
  
  <pre><code>         obj_Dlr = GetDataLoggerRecipe(s_Dlr)
           If Not s_Var = "" Then
  
              Debug.Print obj_Dlr.GetColumn(s_Var).Name
  
           End If
  
           obj_Dlr = GetDataLoggerRecipe(s_Dlr)
           If Not s_Var = "" Then
  
              Debug.Print obj_Dlr.GetColumn(s_Var).Name
  
           End If
  </code></pre>
  
  <p>I'm interested in understanding what is going on, as it helps me to solve anotehr problem.</p>
  
  <p>Thanks </p>