Selection Property [WksWindow]

Selection returns or sets the window's selected range. Returns null if nothing is selected. Returns a variant.

Syntax

object.Selection

object. Selection = Range

Parameter

Type

Description

Range

Variant

required

Remarks

The range is specified as a range object, as a range string ("A1:B5"), or as a cell coordinate string ("A5").

Example

This example demonstrates how to select a range of cells.

WksWindow.Selection = "A1:B5"

Used by: WksWindow object