LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Order of Calculation for Functions in Automation Add-In

I have written an Automation Add-In in C# (2005). On my spreadhseet, I
have the result of one volatile function as one of the input params for
another volatile function (i.e. MyFunc1 is in cell B2, and B2 is an
input param to MyFunc2). The behavior I have noticed is that when I hit
F9, The 2nd Function (MyFunc2) tries to execute first and fails since
the 1st function (MyFunc1) has not yet been calced and only then does
Excel calc the 1st function followed by the 2nd function giving the
correct result. This is dissapointing since Excel knows that one is fed
to the other and should know to calc that one first. The consequence is
that Excel makes an expensive call into the Add-In. It begins to
evaluate the second function and only when it hits a line of code in C#
which tests if the input is valid does it throw a .NET exception which
is expensive. Is there some way to teach Excel the priority, or to
force it to be smarter?
 
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
automation of YTD calculation MPP Excel Worksheet Functions 2 November 20th 08 02:15 PM
Forcing calculation through automation Nirmal Singh[_2_] Excel Programming 2 May 15th 06 10:30 AM
Tab Order Automation?? peter.thompson[_22_] Excel Programming 3 January 2nd 06 09:25 PM
addIn functions in automation nicgendron Excel Programming 1 July 14th 05 10:35 AM
Add-In Functions not listed in Automation mrvgson Excel Programming 11 January 8th 05 05:27 AM


All times are GMT +1. The time now is 10:54 AM.

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"