#1   Report Post  
Greg
 
Posts: n/a
Default 2 combo boxes

I have 2 combo boxes and depending on the choice in combo 1 I want combo 2
box to change choices. Is this possible. thx, greg
  #2   Report Post  
IC
 
Posts: n/a
Default

Using VBA you can specify the ListFillRange for ComboBox2.

Private Sub ComboBox1_LostFocus()
If ComboBox1.Value = "Option1" Then
ComboBox2.ListFillRange = "B1:B3"
ElseIf ComboBox1.Value = "Option2" Then
ComboBox2.ListFillRange = "C1:C3"
ElseIf ComboBox1.Value = "Option3" Then
ComboBox2.ListFillRange = "D1:D3"
End If
End Sub

You can also clear the CB2 displayed entry when selecting CB1 with this

Private Sub ComboBox1_GotFocus()
ComboBox2.Value = ""
End Sub

otherwise CB2 continues to display the last selected item until you change
it.

Ian

"Greg" wrote in message
...
I have 2 combo boxes and depending on the choice in combo 1 I want combo 2
box to change choices. Is this possible. thx, greg



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
Dynamic Drop Down Boxes Scooter Excel Worksheet Functions 1 February 8th 05 05:22 AM
limiting combo box entry tjb Excel Worksheet Functions 5 February 1st 05 04:37 PM
dynamic combo boxes tjb Excel Worksheet Functions 2 January 25th 05 07:33 PM
combo boxes in pocket excel NCFS 1-3 Excel Discussion (Misc queries) 0 January 22nd 05 09:53 PM
How do I autofill combo boxes with their destination cell? Defoes Right Boot Excel Worksheet Functions 3 January 10th 05 12:49 PM


All times are GMT +1. The time now is 01:51 AM.

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"