#1   Report Post  
Posted to microsoft.public.excel.misc
N.F N.F is offline
external usenet poster
 
Posts: 1
Default Combobox drop down

Help please

I have a userform combobox that is linked to other sheet.
I want to find a way in Visual Basic so that when an item is selected from
this drop
down menu, it returns a second list which I have in another sheet.

EXAMPLE: I click on the combobox to have the drop down list show. From this
drop down list, I want to be able to click on one of the items it has to
offer. Now the problem is: Once I click on this Item how do I make it so that
it shows a secondary list within the selected drop down item

Any Help greatly appreciated


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Combobox drop down

As an alternative to VBA, look he

http://www.contextures.com/xlDataVal02.html

"N.F" wrote:

Help please

I have a userform combobox that is linked to other sheet.
I want to find a way in Visual Basic so that when an item is selected from
this drop
down menu, it returns a second list which I have in another sheet.

EXAMPLE: I click on the combobox to have the drop down list show. From this
drop down list, I want to be able to click on one of the items it has to
offer. Now the problem is: Once I click on this Item how do I make it so that
it shows a secondary list within the selected drop down item

Any Help greatly appreciated


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Combobox drop down

hi,
on your form you would need two comboboxes. The first combobox would list
your rowsource for the first combobox. you would then need to add code using
the combobox1 change event to set the rowsource of the second combobox based
on the selection in the first combobox.
here i use test data from a project i helped a guy out on several week ago.
rowsource of combobox 1 is A2:A5
Private Sub CB1_Change()
If Me.CB1.Value = "nag" Then
Me.CB2.RowSource = "B2:B5"
Else
If Me.CB1.Value = "sway" Then
Me.CB2.RowSource = "C2:C5"
Else
If Me.CB1.Value = "runner" Then
Me.CB2.RowSource = "D2:D5"
Else
If Me.CB1.Value = "dilso" Then
Me.CB2.RowSource = "E2:E5"
End If
End If
End If
End If
End Sub

There is probable more than one way to do this but this is tested and works.

regards
FSt1

"N.F" wrote:

Help please

I have a userform combobox that is linked to other sheet.
I want to find a way in Visual Basic so that when an item is selected from
this drop
down menu, it returns a second list which I have in another sheet.

EXAMPLE: I click on the combobox to have the drop down list show. From this
drop down list, I want to be able to click on one of the items it has to
offer. Now the problem is: Once I click on this Item how do I make it so that
it shows a secondary list within the selected drop down item

Any Help greatly appreciated


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
combobox into another combobox girlie New Users to Excel 1 September 26th 06 10:31 AM
combobox changes value flow23 Excel Discussion (Misc queries) 0 May 11th 06 04:44 PM
combobox value flow23 Excel Discussion (Misc queries) 0 April 26th 06 12:21 PM
combobox flow23 Excel Discussion (Misc queries) 3 April 21st 06 04:11 PM
COMBOBOX smiley New Users to Excel 1 October 12th 05 02:01 PM


All times are GMT +1. The time now is 06:24 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"