LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 968
Default stop formula recalculation when formula contains UDF

Formulas are always evaluated by Excel when they are entered or changed,
thats by design, whether they are UDFs or ordinary formulae.

If you dont want your UDFs to execute then set a Global switch to True and
add
If Switch then exit function
to the top of your UDFs

Then when you have finished changing the formulae set the switch to False
and reset calculation to whatever it was before you started.

For performance reasons it is usually best to modify a block of formulae in
an array and then write it back to Excel in one block.

Charles
__________________________________________________
Outlines for my Sessions at the Australia Excel Users Group
http://www.decisionmodels.com/OZEUC.htm

"ep" wrote in message
...
Hi,

I'm developing an addin for Excel 2003 in C# that loops through a range of
cells that contain formulas and, based on certain conditions, changes the
formula. The problem is, the formulas contain calls to my UDF's, so every
time I change the range.Formula property, it will jump right into my
functions and recalculate. I've tried setting the application.Calculation
method to xlCalculationManual, but it still continues to run the UDF as
soon
as I set the formula property.

Is there anything else I can try? Or any reason why I should expect this
behavior?

thanks in advance



 
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
How do I stop a recalculation in Excel? tengel Excel Discussion (Misc queries) 6 November 7th 08 11:04 PM
Formula Recalculation Error uknow message board Excel Worksheet Functions 2 September 21st 06 05:33 PM
Recalculation of Formula. Big Rick Excel Discussion (Misc queries) 5 September 8th 05 04:09 PM
Formula Recalculation after using AutoFilter DD in Virginia Excel Worksheet Functions 4 November 8th 04 01:41 AM
Formula recalculation speed Steve Slack Excel Programming 3 October 1st 03 06:06 AM


All times are GMT +1. The time now is 08:35 AM.

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

About Us

"It's about Microsoft Excel"