Export (0) Print
Expand All
Expand Minimize

Application.ThisCell Property

Office 2007
Returns the cell in which the user-defined function is being called from as a Range object.

Syntax

expression.ThisCell

expression   A variable that represents an Application object.

Remarks

Users should not access properties or methods on the Range object when inside the user-defined function. Users can cache the Range object for later use and perform additional actions when the recalculation is finished.

Example

In this example, a function called "UseThisCell" contains the ThisCell property to notify the user of the cell address.

Visual Basic for Applications
Function UseThisCell()
    MsgBox "The cell address is: " & _
        Application.ThisCell.Address
End Function



Community Additions

ADD
Show:
© 2014 Microsoft