Function-Picker (fx) puzzle Excel 2000

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15641
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Function-Picker (fx) puzzle Excel 2000

Post by ChrisGreaves »

I'm not understanding the function-picker's sequence of events.
The attached workbook demonstrates part of a larger problem; I have stripped-out all but this fragment.
I select cell F18 and use Excel's function-picker (fx) to obtain the user-defined function adblValue.
I will be using the cell C16 as the source of data.
I select the adblValue function and choose OK.
I am presented with the function-picker's parameter dialog.
I click in cell C16 and am rewarded with a MsgBox pop up (1) telling me that the cell has been identified and strValue is now seen as "00098.7027".
I click OK on the MsgBox and see the MsgBox pop up (2) being refreshed.
I choose "OK" on the function-picker's parameter dialog and am rewarded with a fresh appearance of the MsgBox pop up (3).
I click OK on the MsgBox and see the MsgBox pop up (4) being refreshed.
I choose "OK" on the function-picker's parameter dialog and am rewarded with a fresh appearance of the MsgBox pop up (5).

Why is the function being entered five times?
I had expected only once.
You do not have the required permissions to view the files attached to this post.
He who plants a seed, plants life.

User avatar
HansV
Administrator
Posts: 78545
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Function-Picker (fx) puzzle Excel 2000

Post by HansV »

Apparently Excel has been programmed to evaluate the function multiple times when the function picker is displayed. I guess that this is to ensure that indirect effects of the formula have been processed, or it might have been an oversight by the developers. To know for sure, you'd have to talk to someone in the Excel development team.
Best wishes,
Hans

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15641
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Function-Picker (fx) puzzle Excel 2000

Post by ChrisGreaves »

HansV wrote:you'd have to talk to someone in the Excel development team.
Thanks Hans.
:igiveup: And my chances of getting this fixed in Excel 2000 are ???:laugh: :rofl:

I came across this because, brave heart that I am, I was essaying with development of a user function that could take as an optional parameter one of a set of built-in functions (Sum, Average, Count etc.), and used a self-built GUI with a listbox to allow the user to pick a function if my user function detected an empty string in the optional argument.
The system goes into an endless loop, or just dies with no CPU activity reported for Excel. (Hence my stripped-down example and discovery above)

Time to take my loaf of bread out of the oven .... :chef:
He who plants a seed, plants life.

User avatar
HansV
Administrator
Posts: 78545
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Function-Picker (fx) puzzle Excel 2000

Post by HansV »

For your info, the behavior that you describe occurs in Excel 2007 too, so assume there have been no substantial changes in Excel's recalculation algorithm, at least not in this respect.
Best wishes,
Hans

User avatar
HansV
Administrator
Posts: 78545
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Function-Picker (fx) puzzle Excel 2000

Post by HansV »

And even setting

Application.Calculation = xlCalculationManual

before invoking the function picker doesn't help...
Best wishes,
Hans

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15641
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Function-Picker (fx) puzzle Excel 2000

Post by ChrisGreaves »

HansV wrote:Application.Calculation = xlCalculationManual
Thanks Hans for these two comments. I am particularly interested to learn that fx, like so many other features and dialogs, remains unchanged from 2000 through 2007 (and probably '97 through 2007)
It sure would be nice to optionally inhibit function execution during function deployment.
He who plants a seed, plants life.