XLL+ Class Library (6.3)

CXllApp::IsInFormulaWizard

Is Excel currently showing the Formula Wizard ?

static BOOL IsInFormulaWizard( );

Return Value

TRUE if the current add-in function is being called from the Excel Function Wizard; FALSE otherwise.

Remarks

If your function is expensive to perform, or may involve user interaction, it is not a good idea to call it from the Excel Function Wizard, as it will be called each time one of the arguments is changed. You can use this function to detect the condition and return a safe, cheap result.

Since this function is static, it is not necessary to use an instance of CXllApp to invoke it. You can use code such as:

    if ( CXllApp::IsInFormulaWizard()) 
    {
        xloRet = xlerrNA;
        return xloRet.Ret();
    }

Automating the code

You can use the XLL+ Function Wizard to generate this code for you automatically. See Do not call in Formula Wizard.

Requirements

Header: xllplus.h

See Also

CXllApp Class | CXllApp Methods | Function property: DoNotCallInFormulaWizard