#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
linking a form combo box... results from the combo box to another Trey Excel Discussion (Misc queries) 1 July 15th 07 01:58 AM
combo reference on another combo box for picking address etc. kbjin Excel Worksheet Functions 1 December 8th 06 03:29 PM
In Excel I need to set up a combo box based on another combo box. donna_ge Excel Discussion (Misc queries) 2 March 29th 06 03:26 PM
"Combo Box - getting control combo box to stick in place in worksh ajr Excel Discussion (Misc queries) 1 February 16th 05 02:05 AM
"Combo Box - getting control combo box to stick in place in worksh ajr Excel Discussion (Misc queries) 0 February 15th 05 07:45 PM


All times are GMT +1. The time now is 02:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"