Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You need to qualify the control name with the sheet name; e.g.:
Sheet1.ListBox_1 -- Vasant wrote in message om... Hi! I would like to attach a ListBox, and/or a ComboBox to one of my Sheets, "NOT A USERFORM". How can I fill this ComboBox or ListBox with Items using VBA?? Sub Help() Dim X As Single 'X could be 200 Dim Myarray() As Variant 'I have 1 ListBox named ListBox_1 and '1 ComboBox named ComboBox_1 in my Sheet MyArray=Array("AAA","BBB","CCC","DDD","EEE","FFF", "GGG","HHH") FOR X=lbound(MyArray) to Ubound(MyArray) ListBox_1.AddItem Myarray(X) ComboBox_1.AddItem Myarray(X) Next X End Sub This does not Work, Any Help??? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sort Listbox Items | Excel Programming | |||
Listbox--moving items up or down | Excel Programming | |||
listing items from listbox | Excel Programming | |||
Counting items in a listbox | Excel Programming | |||
Checking Listbox Items | Excel Programming |