This code brings a listbox up on a spreadsheet so you can line items from a list.....it then drops those items into a column on the spreadsheet.....I can't figure out how to designate a column! The first row is 13, but it always drops in column"A" row "13", I need it to start in column "B" row "13".......How do I designate a column?
CODE
Sub CommandButton2_Click()
DialogSheets ("Dialog2") . ListBoxes ("List Box 4")
For i = 1 To DialogSheets ("Dialog2") . ListBoxes ("List Box 4") . ListCount
DialogSheets ("Dialog2") . ListBoxes ("List Box 4") . Selected (i) = False
Next i
Sheets ("2EntSingle") . Select
Range ("A13:A51") . ClearContents
DialogSheets ("Dialog2") . Show
'Transfer list from dialogbox:
j = 13 [code]
For I = 1
To DialogSheets ("Dialog2") . ListBoxes ("List Box 4") . ListCount
If DialogSheets ("Dialog2") . ListBoxes ("List Box 4") . Selected (i) = True
Then Sheets ("2EntSingle") . Cells (j, 1) . Value = DialogSheets ("Dialog2") . ListBoxes ("List Box 4") .List (i)
J = j + 1
End If
Next i
End Sub
Mod Edit: Please, next time, use code tags, like so :code:
Thanks :)
This post has been edited by PsychoCoder: 19 Jan, 2008 - 09:51 PM