ListObject::AutoSelectRows Property
Gets or sets a value that indicates whether the entire row is selected when the SelectedIndex changes.
Assembly: Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
Property Value
Type: System::Booleantrue to select the entire row; otherwise, false. The default is false.
The entire row in the ListObject control user interface that corresponds to the SelectedIndex is selected when this property is set to true.
The following code example creates a ListObject on the current worksheet. It uses the SelectedIndex and AutoSelectRows properties to select the second row and to specify that the entire row is selected when the user clicks a row. The code example also creates an event handler for the SelectedIndexChanged event that displays a message box whenever a new row is selected.
This version is for a document-level customization.
This version is for an application-level add-in.