Combo Box

K

krh22

I have created a combo box in VB that works fine using the following code...

Private Sub ComboBox1_Change()
ComboBox1.List = Array("Red", "Yellow", "Blue","")
End Sub

The problem that I am having is that when I exit out of excel and then
reopen the workbook the combo box no longer works. I have to go back into VB
and click RUN SUB/USER FORM to get it to work again. I have never used VB so
I figure I must have something wrong with my code or am overlooking something
simple.

Any suggestions would be appreciated...Thanks
 
J

Jim Thomlinson

You have embeded a combo box from the Control toolbox into your worksheet.
The easiest way to populate the combo box is to assign the list fill range.
Click on the Ruler and Triangle icon on the control toolbox to put your
workbook into design mode. Right click the Combo Box and Select Properties.
Assign a range of cells to the list fill range. Whatever you put in that
range of cells will be the values associated with the dro down.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top