title: UDF - Identify if it's a recalculation or first execution
body: <p>I want to program a UDF to query a access db. I'm wondering if it's possible to have 2 different Workflows, depending whether it's a first execution or only a recalculation of the UDF.<br>
  Ideally I would have a UDF that you can feed the primary key of the db and the UDF presents an overview of possible values of the access db table. If it's a recalculation I don't want to have a userform popup again. Is this possible at all? Can somebody point me in the right direction?<br>
  Thx!  </p>
  
  <p><strong>Edit</strong>
  An attempt to show some (dummy) code:  </p>
  
  <pre><code>public function key_from_table(primarykey as string) as string
  ' Read-out column names from Access table for userform
  ' Trigger userform with possible column names and let user choose
  ' readout Chosen column names
  key_from_table = Call get_from_db(Primary_key, column_names)
  end function
  
  Function get_from_db(Primarykey as string, column_names as string) as string
  'call Access db and readout result
  end Function 
  </code></pre>
  
  <p>If a recalculation is triggered the userform popup comes up again<br>
  I'm still new to Excel vba - pls tell me if this is rather stupid :)</p>