WebListBoxItems.Selected method (Publisher)
Selects or cancels the selection of an item in a web list box control.
Syntax
expression.Selected (Index, SelectState)
expression A variable that represents a WebListBoxItems object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
Index | Required | Long | The number of the web list box item. |
SelectState | Required | Boolean | True to select the list item. |
Example
This example verifies that an existing web list box control allows selecting multiple entries and then selects two items in the list.
Sub SelectListBoxItem()
With ActiveDocument.Pages(1).Shapes(1) _
.WebListBox
If .MultiSelect = msoTrue Then
With .ListBoxItems
.Selected Index:=1, SelectState:=True
.Selected Index:=3, SelectState:=True
End With
End If
End With
End Sub
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.