Detecting calls from the Function Wizard.
Posted by
Keith A. Lewis on
Jun 15, 2012; 7:21pm
URL: http://quantlib.414.s1.nabble.com/Detecting-calls-from-the-Function-Wizard-tp13260.html
Here is a simple solution:
// Detects if UDF is being called from the function wizard.
template<class X>
inline bool in_function_wizard(void)
{
return !Excel<X>(xlfGetTool, XOPER<X>(4), XOPER<X>(_T("Standard")), XOPER<X>(1));
}
This uses the library from
http://xll.codeplex.com, but you get the idea. No need to enumerate windows like in the Excel SDK example. Enjoy!