Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default How to stop UDF firing when sheets(n).calculate

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?
--
David
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default How to stop UDF firing when sheets(n).calculate

Hi David,

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

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel

"David" wrote in message
...
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?
--
David



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default How to stop UDF firing when sheets(n).calculate

Add this line of code at the beginning of the function. It will keep the
function from recalculating

Application.Volatile (False)

--
HTH...

Jim Thomlinson


"David" wrote:

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?
--
David

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default How to stop UDF firing when sheets(n).calculate

Nick,

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


"Niek Otten" wrote:

Hi David,

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

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel

"David" wrote in message
...
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?
--
David




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default How to stop UDF firing when sheets(n).calculate

Thanks Jim, much appreciated
--
David
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
STOP Auto Calculate EngelseBoer Excel Discussion (Misc queries) 5 July 22nd 09 08:12 PM
Calculate how much time falls between set start and stop times Polly Excel Worksheet Functions 17 September 3rd 08 12:12 PM
Excel 2002: Formulas stop calculate correctly after 13.4MB Mr. Low Excel Discussion (Misc queries) 4 May 19th 08 02:52 PM
Stop Worksheet_SelectionChange event from firing? Ed Excel Programming 13 January 5th 05 12:57 PM
class events stop firing with ADO 2.8 ThankYou_jeff Excel Programming 4 November 14th 04 10:59 AM


All times are GMT +1. The time now is 11:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"