knharris75
New Member
- Joined
- Jun 21, 2010
- Messages
- 2
I have a userform that contains a listbox that needs to do the following:
1. Allow multiple data elements to be selected
2. Copy those selected items to the active cell
3. Place all the data elements in the active cell.
Here is the code I have written, I just need to figure out how to make it work for multiselection, HELP ME PLEASE!!!!!!!!!!!
Private Sub CommandButton2_Click()
Sheet2.Activate
ActiveCell.Offset(0, 0).Range("A1").Select
ActiveCell.Value = UserForm1.ListBox1.Value
UserForm1.ListBox1.Value = vbNullString
UserForm_Click
End Sub
1. Allow multiple data elements to be selected
2. Copy those selected items to the active cell
3. Place all the data elements in the active cell.
Here is the code I have written, I just need to figure out how to make it work for multiselection, HELP ME PLEASE!!!!!!!!!!!
Private Sub CommandButton2_Click()
Sheet2.Activate
ActiveCell.Offset(0, 0).Range("A1").Select
ActiveCell.Value = UserForm1.ListBox1.Value
UserForm1.ListBox1.Value = vbNullString
UserForm_Click
End Sub