View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jim Tibbetts Jim Tibbetts is offline
external usenet poster
 
Posts: 74
Default Put selected names in correct place

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