Name

Application.Caller

Synopsis

Returns information about how the macro was called, as described in the following table:

When called from

Returns

A formula entered in a cell

A Range object for the cell

An array formula in a range of cells

A Range object for the range of cells

VBA code, the Run Macro dialog box, or anywhere else

Error 2023

An Auto_Open, Auto_Close, Auto_Activate, or Auto_Deactivate macro

The name of the workbook (Obsolete)

A macro set by the OnDoubleClick or OnEntry property

The name of the chart or cell to which the macro applies (Obsolete)

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.