Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Any more effective method to get selected item in Listbox?
Hi,
I have a question about the Userform.listbox I would like to make a userform, which has 2 listbox. The first one (listbox1) is showing the sheet name in workbook. Another (listbox2) is showing the range(cells(1,1),cells(1,1).end(xltoright).column) of select sheet name (selected at listbox1) my normal practice to get selected item in listbox is below. Any more effective method? _______________________________________ k = userform.lisbox1.ListCount j = 1 For i = 1 To k If userform.lisbox1.Selected(i - 1) = True Then ReDim Preserve Array(j) Array(j) = i j = j + 1 End If Next i _______________________________________ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Selected listbox item | Excel Programming | |||
Selected ListBox item to TextBox | Excel Programming | |||
Worksheet Listbox selected item? | Excel Programming | |||
Delete selected Item from listbox | Excel Programming | |||
How to get the index in VBA of the selected item in a ListBox | Excel Programming |