Create Combobox Visual Basic

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
You could just clear it each time, a bit simpler than building on the fly.

Combobocx1.Clear
 
Back
Top