Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
i have inserted a ComboBox called "ComboBox1" into an Excel Sheet. Now I would like to fill this using vba. unfortunately ComboBox1.additem "test" does not work. this only seems to work when i insert a combobox into a user form. how do i fill the combo box that is placed directly into the excel sheet using vba? thanks for your help |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
If you want to fill single word, try this code With Sheet1.ComboBox1 .Value = "Test" End With If you want to fill a range of list then try the following. Dim n As Integer n = Cells(Rows.Count, "A").End(xlUp).Row With Sheet1.ComboBox1 .AutoSize = False .AutoTab = False .List = Worksheets("Sheet1").Range("A1:A" & n).Value 'Range of List containing in the Column A:A End With Regards, Kannan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Fill combo box from range | Excel Programming | |||
Conditional Combo Box Fill | Excel Programming | |||
Combo Box fill | Excel Programming | |||
Fill two column combo box | Excel Programming | |||
Combo Box Fill Range | Excel Programming |