![]() |
Combo Box
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 |
Combo Box
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. -- HTH... Jim Thomlinson "krh22" wrote: 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 |
All times are GMT +1. The time now is 07:44 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com