multiple Property
Returns or sets a Boolean that represents whether multiple items can be selected from a list.
expression.multiple
*expression * Required. An expression that returns one of the objects in the Applies To list.
Example
The following example inserts a list box into the active document and then specifies that users can select multiple items from the list, the number of items to display in the list at a time, and the script to run when the selection changes.
Sub AddListBox()
Dim objListBox As FPHTMLSelectElement
Dim strHTML As String
strHTML = "<SELECT ID=""pets"">" & "<OPTION VALUE=""1"">Cat" & _
vbCrLf & "<OPTION VALUE=""2"">Dog" & vbCrLf & _
"<OPTION VALUE=""3"">Snake" & vbCrLf & "</SELECT>"
ActiveDocument.body.insertAdjacentHTML _
where:="beforeend", HTML:=strHTML
Set objListBox = ActiveDocument.all.tags("select").Item("pets")
With objListBox
.multiple = True
.Size = "6"
End With
End Sub
Applies to | FPHTMLSelectElement Object | IHTMLSelectElement Object