Specifies whether a user may select more than one item in a Web list box control. Read/write.
expression. MultiSelect
_expression_A variable that represents a WebListBox object.
MsoTriState
The MultiSelect property value can be one of the MsoTriState constants declared in the Microsoft Office type library and shown in the following table.
Constant | Description |
---|---|
msoFalse | Indicates a user may only select one item in a Web list box control. |
msoTrue | Indicates a user may select more than one item in a Web list box control. |
This example add a Web list box control to the active publication, add items to it, and specifies that a user may select more than one item.
Sub NewListBoxItems()
Dim intCount As Integer
With ActiveDocument.Pages(1).Shapes.AddWebControl _
(Type:=pbWebControlListBox, Left:=100, _
Top:=100, Width:=150, Height:=100).WebListBox
.MultiSelect = msoTrue
With .ListBoxItems
For intCount = 1 To .Count
.Delete (1)
Next
.AddItem Item:="Yellow"
.AddItem Item:="Red"
.AddItem Item:="Blue"
.AddItem Item:="Green"
.AddItem Item:="Black"
End With
End With
End Sub