MultiSelect Property [Publisher 2003 VBA Language Reference]
MsoTriState
MsoTriState can be one of these MsoTriState constants. |
msoCTrue |
msoFalse Indicates a user may only select one item in a Web list box control. |
msoTriStateMixed |
msoTriStateToggle |
msoTrue Indicates a user may select more than one item in a Web list box control. |
expression.MultiSelect
expression Required. An expression that returns one of the objects in the Applies To list.
Example
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
Applies to | WebListBox Object