Skip to content

Latest commit

 

History

History
55 lines (35 loc) · 1.26 KB

cc81682f-5212-0912-d979-16567c2dc42b.md

File metadata and controls

55 lines (35 loc) · 1.26 KB

WebListBox.MultiSelect Property (Publisher)

Specifies whether a user may select more than one item in a Web list box control. Read/write.

Syntax

expression. MultiSelect

_expression_A variable that represents a WebListBox object.

Return Value

MsoTriState

Remarks

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.

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