So here's my setup:
* I have an Excel DNA function ([ExcelFunction]) that takes different keywords, and returns different results according to the keyword.
** For e.g., let's call my function "myFunc",
calling =myFunc("states") would return a list of US states, which are then displayed on the worksheet using a 2-dimensional object array.
calling =myFunc("cities") would return a list of US cities
* One of the keywords is "HELP" (i.e. =myFunc("HELP") ) --> this brings up a modal dialog box that allows people to lookup available keywords, read some helptext about the keyword etc.
Here's the problem:
* When a user uses the =myFunc("HELP") to bring up the help dialog, that works fine, dialog comes up, user interacts with it, closes it, all good.
* However, the function call (i.e. =myFunc("HELP") ) gets embedded in the cell. Next time the user recalculates the worksheet (we advise them to use Ctrl + Alt + Shift + F9) - it recalculates all the formulas, *INCLUDING* the one that brings up the dialog box, and promptly brings up the help dialog box, even though the user did not explicitly invoke it.
My question is- what do I do to prevent this behavior? I tried creating a seperate excel function called =myFuncHelp that returns void - that simply puts a FALSE in the cell, but the formula still stays as is. I guess I need some way so that the excel function is not really embedded in the cell as a formula, but instead simply shows the dialog and leaves the cell empty.
Any pointers are appreciated.