Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
S
Expand Minimize

Selection Property

Office 2003

ChartSpace object: Returns an Object that represents the selected object. Use the TypeName function to determine the type of the selected object.

PivotTable object: Returns or sets an Object that represents the selected object.

Spreadsheet and Window objects: Returns a Range object that represents the selected cells.

expression.Selection

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

Example

The procedure in this example runs whenever the selection in the chart workspace changes. If the user selects an axis, the procedure displays the minimum and maximum values for the axis.

Sub ChartSpace1_SelectionChange()

   Dim chConstants
   Dim minval
   Dim maxval

   Set chConstants = ChartSpace1.Constants

   If ChartSpace1.SelectionType = chConstants.chSelectionAxis Then

      minval = ChartSpace1.Selection.Scaling.Minimum

      maxval = ChartSpace1.Selection.Scaling.Maximum

      MsgBox "minimum = " & minval & " maximum = " & maxval
   End If

End Sub
		




Show:
© 2015 Microsoft