User form single fmMultiSelectSingle listbox Value property stops working!

TimLundSE26

New Member
Joined
Apr 30, 2011
Messages
11
Anyone know why this should happen? For months a client has been successfully using some code using the Value property of a Listbox which is set to single selection, and suddenly it doesn't - but
Me.lstMonths.Column(Me.lstMonths.ListIndex)
does - lstMonths being the name of the control.

For the sale of precision, lstMonths.Value returns the empty string, and the listbox has a single column.
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Tim

Sorry, do you mean they were using Me.lstMonths.Value but it's not working now but using Column does?

How exactly is the listbox being populated?

PS Isn't it Me.lstMonths.Column(0,Me.lstMonths.ListIndex)?
 
Last edited:
Upvote 0
Yes - that is what I meant.

The listbox gets populated by the property List being assigned a single dimension array - in fact the keys of a Dictionary object, like this
Me.lstMonths.List = hMonths.Keys
Me.lstMonths.Column(0,Me.lstMonths.ListIndex)? Yes - thanks. There was only one element in the array, so my error will not have shown up:oops:
 
Upvote 0
So you found the problem?

Was it to do with a Dictionary object, which you were using to populate the listbox?
 
Upvote 0
No - I've not found the problem - but I had found a workround. I was asking as a matter of interest - building up background knowledge.
 
Upvote 0

Forum statistics

Threads
1,224,524
Messages
6,179,308
Members
452,904
Latest member
CodeMasterX

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top