Selection Property Example

This example clears the selection on Sheet1 (assuming that the selection is a range of cells).

Worksheets("Sheet1").Activate
Selection.Clear

This example displays the Visual Basic object type of the selection.

Worksheets("Sheet1").Activate
MsgBox "The selection object type is " & TypeName(Selection)