Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I have one multi-select two column listbox on a userform. I have a button that will take the selection from the mult-select listbox that has two columns to another listbox that also has two columns. Here is my code: Dim itemIndex As Integer Dim myVar As Variant With frmEmployeeMaintenance .lstClubsAssigned.RowSource = "" 'second listbox If .lstClubs.ListIndex = -1 Then 'first listbox Exit Sub End If For itemIndex = .lstClubs.ListCount - 1 To 0 Step -1 If .lstClubs.Selected(itemIndex) Then .lstClubsAssigned.AddItem .lstClubs.Column(0, itemIndex) & ";" & .lstClubs.Column(1, itemIndex) End If Next itemIndex End With I found this code on a help forum, but it is not working for me. It only adds a concatenated string to the first column. How do I add values to both columns? Thanks, Tony |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how can i lock columns but allow for new rows to be added? | Excel Discussion (Misc queries) | |||
Data is added in 1 column instaed of 4 columns (in listbox) | Excel Programming | |||
formula to sum the prior 12 cells regardless of added columns? | Excel Worksheet Functions | |||
Added new columns - Pivot Table not refreshing - why? | Excel Worksheet Functions | |||
Sum of Rows when columns are added | Excel Programming |