Solved

Simple Excel 2010 MultiSelect Listbox retrieval

Posted on 2013-11-18
264 Views
See attached.
When an item is clicked in the multiselect listbox the code should
first show the # of items in the list (which it does fine)
then show true/false indicating if the 1st item was selected - instead it returns an error "Unable to get the selected propery of the listbox"
Any idea - I'm sure it's something silly I'm overlooking.
Again I'm using Excel 2010
thx

Sub ListBox1_Change()
With Worksheets("Sheet1").ListBoxes("List Box 1")
MsgBox (.ListCount)
MsgBox (.Selected(0))
End With
End Sub
Sample-MultiSelect.xlsx
0
Question by:endurance

LVL 9

Accepted Solution

Valliappan AN earned 330 total points
ID: 39657699
Try .Selected(1)
0

Author Comment

ID: 39657706
d'oh - thanks!!
0

Featured Post

Suggested Solutions

Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …