Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create Combobox Visual Basic
Hi!
I have a problem with Comboboxes. I need to add combobox to some cells in excel. And there would have to be some options to select. So to create a combobox and add options I´m doing this. Private Sub ComboBox1_Change() ComboBox1.AddItem "A" ComboBox1.AddItem "B" ComboBox1.AddItem "C" End Sub The problem is that the options will be added each time I click om the combomeny. So does any one know how to create a combobox and add a list of options with Visual Basic code. I also need to refer a cell to a combobox so it is just allowed to change the option in that specifed cell and so the combo box should not move from the cell if someone would try. Thanx |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create Combobox Visual Basic
You could just clear it each time, a bit simpler than building on the fly.
Combobocx1.Clear -- HTH Bob Phillips "Amoni" wrote in message ... Hi! I have a problem with Comboboxes. I need to add combobox to some cells in excel. And there would have to be some options to select. So to create a combobox and add options I´m doing this. Private Sub ComboBox1_Change() ComboBox1.AddItem "A" ComboBox1.AddItem "B" ComboBox1.AddItem "C" End Sub The problem is that the options will be added each time I click om the combomeny. So does any one know how to create a combobox and add a list of options with Visual Basic code. I also need to refer a cell to a combobox so it is just allowed to change the option in that specifed cell and so the combo box should not move from the cell if someone would try. Thanx |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is Visual Basic the same as Visual Studio 2008? | Excel Worksheet Functions | |||
Create and Use Button Menu using visual Basic in Excel | Excel Discussion (Misc queries) | |||
changing the visual basic in office 2003 to visual studio net | Excel Discussion (Misc queries) | |||
Excel Visual Basic - need help to create a loop of filenames | Excel Programming | |||
Visual Basic: Combobox Complications | Excel Programming |