Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
TO TO is offline
external usenet poster
 
Posts: 6
Default Dynamic combo box

Hello all,

Is it possible to have the'List Fill Range" in a combo
box change depending on the value of another cell.

i.e. if the user selects February, the list fill range is
C3:C9, if March is selected C10:C25, etc.

Thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Dynamic combo box

You can check the listindex in Combobox1 and fill in the list in combobox2

Private Sub UserForm_Initialize()
Application.EnableEvents = False
ComboBox1.List = Range("z1:z3").Value
ComboBox2.List = Range("a1:a3").Value
ComboBox1.ListIndex = 0
ComboBox2.ListIndex = 0
Application.EnableEvents = True
End Sub

Private Sub ComboBox1_Change()
ComboBox2.Clear
If ComboBox1.ListIndex = 0 Then ComboBox2.List = Range("a1:a3").Value
If ComboBox1.ListIndex = 1 Then ComboBox2.List = Range("b1:b3").Value
If ComboBox1.ListIndex = 2 Then ComboBox2.List = Range("c1:c3").Value
ComboBox2.ListIndex = 0
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"TO" wrote in message ...
Hello all,

Is it possible to have the'List Fill Range" in a combo
box change depending on the value of another cell.

i.e. if the user selects February, the list fill range is
C3:C9, if March is selected C10:C25, etc.

Thanks in advance



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
Dynamic Combo Box benjarfer Excel Worksheet Functions 2 April 8th 05 02:17 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
dynamic combo boxes tjb Excel Worksheet Functions 2 January 25th 05 07:33 PM


All times are GMT +1. The time now is 10:45 PM.

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

About Us

"It's about Microsoft Excel"