![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Apr 2002
Location: Pittsburgh, PA
Posts: 317
|
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?
__________________
Thanks in advance, Patrick |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Apr 2002
Location: Pittsburgh, PA
Posts: 317
|
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!!!
__________________
Thanks in advance, Patrick |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Apr 2002
Location: Pittsburgh, PA
Posts: 317
|
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. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|