Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Nice easy Listbox queries
Good afternoon, all!
I'm trying to take the selected items from the listbox and add them to the worksheet range "Target" However, I'm not quite sure how to reference the value of the selected item(s) from the listbox. Any helpful souls out there? Thanks in advance Pete Private Sub UserForm_Initialize() Range("Target").ClearContents Dim ListCell As Range For Each ListCell In Range("CarList") ListBox1.AddItem ListCell.Value Next End Sub Private Sub cmdOK_Click() Dim I As Integer For I = 1 To ListBox1.ListCount If ListBox1.Selected(I) = True Then Range("Target").Cells(I, 1).Formula = ListBox1(I).Text <--------- ! End If Next I Unload Me End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
very nice........... | Excel Worksheet Functions | |||
Thank you for a nice party | Excel Discussion (Misc queries) | |||
Nice | Excel Discussion (Misc queries) | |||
Easy Listbox to Sheet? | Excel Programming | |||
listbox.value not equal to listbox.list(listbox.listindex,0) | Excel Programming |