Caller
User Defined Function in Excel VBA (Visual Basic for Application). Application.Caller.Text: Returns information by directing the flow that how a code or UDF (User Defined Function) was called. Caller represents cell reference which is a Range object in Excel hence, we can retrieve all the properties of a cell like below:
Code example
With Application.Caller CallerRows = .Rows.Count CallerCols = .Columns.Count CallerAddr = .Address End With
Get Caller Address
Public Sub GetCallerAddress() MsgBox Application.Caller.Address End Sub
Get Caller Cell Value
Public Sub GetCallerValue() MsgBox Application.Caller.Text End Sub
Next >> User Defined Functions