XL5: Problems with MultiSelect Property of ListBox ClassID: Q115620
|
In Microsoft Excel version 5.0, when you use the MultiSelect property for
ListBox objects in a Visual Basic, Applications Edition, macro, you may
experience either of the following problems:
-or-Run-time error '1005': Unable to set the MultiSelect property of the ListBox class
The Microsoft Excel version 5.0 constants xlNone, xlSimple, and xlExtended are mapped to the wrong values.
For the MultiSelect property, use the values 1, 2, and 3 in place of the
constants xlNone, xlSimple, and xlExtended (respectively).
To set the selection mode
of a list box to this Use this value
-----------------------------------------------------
Single select <object>.Multiselect = 1
Simple multi-select <object>.MultiSelect = 2
Extended multi-select <object>.MultiSelect = 3
Microsoft has confirmed this to be a problem in Microsoft Excel version 5.0 for Windows. This problem was corrected in Microsoft Excel for Windows, version 5.0c.
For more information about the expected behavior of these constants, choose
the search button in Visual Basic Help, and type:
Multiselect
The following sections describe the ACTUAL behavior of each constant.
Run-time error '1005':
Unable to set the MultiSelect property of the ListBox class
ActiveSheet.ListBoxes(1).MultiSelect = True
and implies that this command will give the list box the Extended
multi-select (xlExtended) property. However, the actual behavior for this
property is as follows:
Run-time error '1005':
Unable to set the MultiSelect property of the ListBox class
Additional query words:
Keywords :
Version : 5.00
Platform : WINDOWS
Issue type :
Last Reviewed: July 29, 1999