ActiveCell Property

Microsoft Office Web Components Visual Basic

Returns a Range object that represents the active cell. Read-only.

expression.ActiveCell

expression    Required. An expression that returns one of the objects in the Applies To list.

Remarks

Be careful to distinguish between the active cell and the selection. The active cell is a single cell inside the current selection. The selection may contain more than one cell, but only one is the active cell.

Example

This example sets the number format in the active cell on the worksheet.

Spreadsheet1.ActiveCell.NumberFormat = "0.##"