Put selected names in correct place
Sorry I didn't make that clearer. Yes - TeamData!A61:A70.
--
Jim T
"Dave Peterson" wrote:
teamlisttop is a range on the activesheet?
Sub DropButton_Click()
Dim i As Long, j As Long
j = range("teamlisttop").row - 1 '<-- added
For i = 0 To TeamListBox.ListCount - 1
If TeamListBox.Selected(i) Then
j = j + 1
Cells(j, "A").Value = TeamListBox.List(i)
End If
Next
Jim Tibbetts wrote:
Thanks Dave. I thought I had tried that before and it didn't work. Guess not.
Works perfectly. Is there any way to use a named range TEAMLISTTOP to
designate the starting cell? Thanks again.
Jim T
"Dave Peterson" wrote:
Sub DropButton_Click()
Dim i As Long, j As Long
j = 72 '<-- added
For i = 0 To TeamListBox.ListCount - 1
If TeamListBox.Selected(i) Then
j = j + 1
Cells(j, "A").Value = TeamListBox.List(i)
End If
Next
Jim Tibbetts wrote:
How do I modify this code to place the selected names from a MultiSelect
listbox starting in cell A73 not A1?
Sub DropButton_Click()
Dim i As Long, j As Long
For i = 0 To TeamListBox.ListCount - 1
If TeamListBox.Selected(i) Then
j = j + 1
Cells(j, "A").Value = TeamListBox.List(i)
End If
Next
Thanks
--
Jim T
--
Dave Peterson
--
Dave Peterson
|