Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
select listbox item
hi,
i would like to know how i can select a listbox item using vba. i tried: for x = 0to sheets("sheet1").listname,listcount - 1 sheets("sheet1").listname.item.select next x but it doesnt work can someone help me? thanks in dvance, geebee |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
select listbox item
On Sep 21, 9:54 am, geebee (noSPAMs) wrote:
hi, i would like to know how i can select a listbox item using vba. i tried: for x = 0to sheets("sheet1").listname,listcount - 1 sheets("sheet1").listname.item.select next x but it doesnt work can someone help me? thanks in dvance, geebee Hello Geebee, When using a Forms type ListBox, you can only select an item either by clicking, or by changing the value of the Linked Cell. This examples assumes the Linked Cell is A1, and the list box is named "List Box 1". It selects the third item in the list. With ActiveSheet .Range("A1").Value = 3 With .ListBoxes("List Box 1") X = .List(.ListIndex) End With End With Sincerely, Leith Ross |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Remove Item from Listbox by Item Name | Excel Programming | |||
Double click item in Listbox to select item and close Listbox | Excel Programming | |||
ListBox3.ListIndex = ListBox3.ListCount -- How to select the last item in a Listbox? | Excel Programming | |||
select listbox item automatically | Excel Programming | |||
Select an item in a listbox using code | Excel Programming |