
If your function was called from a VBA user-defined function (UDF), xlfCaller again returns the address of the cells that called the VBA function. If the function was called from the cell's conditional format expression, you are still returned a reference to the associated cell or cells, so you cannot assume that the cell's formula contains the XLL function. You can obtain a reference to the calling cell or range of cells within your function using the C API function xlfCaller.

The condition and limit fields in a conditional format dialog box.įrom another add-in via the C API function xlUDF.įrom Visual Basic for Applications (VBA) via the Application.Run method.

Once they are registered, XLL worksheet and macro sheet functions can be called from anywhere a built-in function can be called from:Ī single-cell or array formula on a worksheet.Ī single-cell or array formula on a macro sheet. Calling XLL functions directly from Excel This is all achieved using the C API function xlfRegister, equivalent to the XLM function REGISTER. Which function category it should be listed under. What text the Paste Function Wizard and AutoComplete editor should display to help with calling the function. Whether it is thread safe (supported starting in Excel 2007). Whether it returns its result by modifying an argument in place. What data types it returns and takes as arguments. What its XLL/DLL export name is, and what name you want Excel to use.

If a command, whether it is a worksheet function or a macro sheet equivalent function. Whether it is callable only from an XLM macro sheet, or also from a worksheet. Whether it is hidden or, if a function, whether it is visible in the Function Wizard.
Accessing phstat in excel registration#
Registration tells Excel the following about a DLL entry point: Registering functions and commands with Excel

To be accessible in Microsoft Excel, the functions and commands that an XLL contains: Applies to: Excel 2013 | Office 2013 | Visual Studio
