ActiveCell Property

The ActiveCell property returns or sets the worksheet active cell location. Returns a WksRange object.

Syntax

object.ActiveCell

object.ActiveCell = Cell

 

Parameter Type Description
Cell Variant required, see below and Specifying Cell Coordinates

 

Remarks

The ActiveCell is a one-cell range that refers to the location of the active cell in a worksheet window. The cell is specified as a range object, as a range string ("A1:B5"), or as a cell coordinate string ("A5"). The bottom-right coordinate is ignored if a range is specified.

Example 1

This example demonstrates how to return the active cell.

Debug.Print WksWindow.ActiveCell

Example 2

This example demonstrates how to set cell A5 as the active cell.

WksWindow.ActiveCell= "A5"

 

Used by: AutoWksWindow object