Tell in UDF if Calced Manually

M

Matthew Wieder

What property can I use in a UDF to determine wether the calculation
currently exectuing is as a result of an F9 push vs. the result of the
workbook being opened and 'auto calc on open' is set? I know about
determining wether excel is set to auto calc vs. manual calc in general,
but this case is where it is set to manual calc with the exception of
the 'auto calc on open' setting and I need to tell the difference
between the two.
thanks.
 
C

Chip Pearson

There is no way to determine this. Why should the code care?


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
M

Matthew Wieder

We have a UDF that writes data back to an external database. We want to
avoid the case where someone who opens a workbook with our UDF and has
'auto calc on open' set would write to the database the old value that
was stored in their workbook, thereby overwriting any changes made to
that value by someone else directly in the database. If the user has
specifically calced the function then we know he wants to write it back,
we're trying to avoid the accidental writeback that automatically occurs.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top