List Box

poleary2000

Active Member
Joined
Apr 1, 2002
Messages
354
I have a UserForm containing a ListBox. The ListBox contains two columns [each filled by an array]. The second column is linked to a cell in the worksheet.

MY PROBLEM -- If the second column contains values that are identical, the ListBox stops functioning whenever I try to click one of the duplicate entries.

Anyone have any information about why this could be happening?
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Okay. I started with a blank workbook. I created a list as shown below:

[RangeA1:B6]
A 100
B 101
C 102
D 100
E 103
F 100

I created a UserForm with a ListBox. The ListBox has the entire range A1:B6 as its RowSource. The ControlSource is D1. The ColumnCount is set to 2. The BoundColumn is set to 2. When you show the form, you will NOT be able to select D or F. I need to be able to select these additional entries.

How can I do this? Can this be done? I am currently assigning my RowSource with an Array.

Help!!!
 
Upvote 0
I figured it out!!!

Here is how I did it:

For n = 0 To (CountListArray - 1)
If ExpenseErrorsListBox.Selected(n) = _
True Then
ItemSelected = _
ExpenseErrorsListBox.List(n, 1)
End If
Next n

The CountListArray is a Public variable that was used in a different Sub.
 
Upvote 0

Forum statistics

Threads
1,213,544
Messages
6,114,249
Members
448,556
Latest member
peterhess2002

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