theduckman16
New Member
- Joined
- Feb 4, 2011
- Messages
- 16
Hello -
I would greatly appreciate some help with a problem I have come across.
I have a form that has two listboxes and listbox1 is populated with the column headers in my worksheet. I want to be able to have the user select columns on the left and "add" them to listbox2. Here is the code that I have so far:
I would greatly appreciate some help with a problem I have come across.
I have a form that has two listboxes and listbox1 is populated with the column headers in my worksheet. I want to be able to have the user select columns on the left and "add" them to listbox2. Here is the code that I have so far:
Code:
Private Sub CommandButton1_Click()
strMsg = "You chose this entry from the list box: " & vbCr
For i = 1 To ListBox1.ListCount
If ListBox1.Selected(i - 1) = True Then
strMsg = strMsg & ListBox1.List(i - 1) & vbCr
End If
Next i
MsgBox strMsg
Last edited: