ViewIndex (Property)

Applies To:

ListBox object

Description:

Enables you to automatically scroll to selected items not shown in listbox view areas. The default property value is the index number of the first item displayed in the current list view. If the index number is set to a new index value, the listbox scrolls to the item and displays at the top of the view window. If an invalid number is specified, a “Invalid index number specified in ControlName” is thrown.

Action:

Read-Write, ViewIndex as Number

Example:

This example sets the new index position to six.

ActiveDocument.Sections["EIS"].Shapes["ListBox1"].ViewIndex=6