How to stop UDF firing when sheets(n).calculate

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Greetings and TIA for your time
I have a UDF which is called by cells only on sheets(2) and is neither a
president or dependent of anything in sheets(1)
During running code I have sheets(1).calculate in each pass of a loop. For
some reason this fires the UDF. It fires once for each instance on sheets(2)
This slows the code down considerably
How can I stop the UDF firing?
 
Hi David,

Is there "Application.Volatile" in the code of the UDF?

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel
 
Add this line of code at the beginning of the function. It will keep the
function from recalculating

Application.Volatile (False)
 
Nick,

No, no application.volatile ...
--
David


Niek Otten said:
Hi David,

Is there "Application.Volatile" in the code of the UDF?

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel
 

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

Back
Top