Solved

Simple Excel 2010 MultiSelect Listbox retrieval

Posted on 2013-11-18
2
284 Views
Last Modified: 2013-11-18
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
Comment
Question by:endurance
2 Comments
 
LVL 9

Accepted Solution

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

Author Comment

by:endurance
ID: 39657706
d'oh - thanks!!
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
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 …

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question