Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to add items to combobox
people i cant add items to the combobox,
i have sheet.name = s1 and on the sheet i have control placed combobox, combobox name is combo1 in vb editor i write this text worksheets("s1").shapes.item("combo1").additem "test" but vb gives me error like = cant find object ??? how to correctly work with sheet controls from vb ? thank -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to add items to combobox
activesheet.oleobjects("combo1").object.additem "test"
-- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Marek " wrote in message ... people i cant add items to the combobox, i have sheet.name = s1 and on the sheet i have control placed combobox, combobox name is combo1 in vb editor i write this text worksheets("s1").shapes.item("combo1").additem "test" but vb gives me error like = cant find object ??? how to correctly work with sheet controls from vb ? thanks --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to add items to combobox
here is my code
Sub Button2_Click() ActiveSheet.OLEObjects("combo1").Object.AddItem "test" End Sub clicking button i get error unable to get Oleobjects property of the worksheet : -- Message posted from http://www.ExcelForum.com |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to add items to combobox
Marek,
I guess that you must have a forms combobox? AFAIK there is no way to additem to a forms combo, you have to link to a spreadsheet range, or change to a control toolbox combo. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Marek " wrote in message ... here is my code Sub Button2_Click() ActiveSheet.OLEObjects("combo1").Object.AddItem "test" End Sub clicking button i get error unable to get Oleobjects property of the worksheet :( --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sorting Items in a ComboBox? | Excel Programming | |||
add a range of items to a combobox | Excel Programming | |||
ComboBox Items | Excel Programming | |||
ComboBox Default items Not Showing | Excel Programming | |||
ComboBox items | Excel Programming |