depedent drop down lists

B

Bonobo

Hello,
I have two drop down lists (done with Forms) on two seperate worksheets. I
would like them to be dependent so that when I make a selection on one of
them the second one changes accordingly to the same entry (and vice versa).
Can anyone help?
 
R

Rick Rothstein \(MVP - VB\)

And vice versa? Okay, that one threw me a little. Can you give us some
sample data that shows what you are trying to do?

Rick
 
B

Bonobo

Let's assume: Drop downlist A in Worksheet1 and Drop Down List B in Worksheet2.
Both Drop Down Lists refer to the same list of possible data entry x, y, z.

What I need:
When I select entry x in Drop Down List A, Drop Down List B is automatcially
updated to entry x. If I then change the entry in DropDown List B to z, Drop
Down LIst A should automatically change to z.

Hope this is clear enough.
 
R

Rick Rothstein \(MVP - VB\)

Okay, I see what you want now. Try putting using this code in the macros you
have assigned to each drop down control...

Sub DropDown1_Change()
Worksheets("Sheet2").DropDowns("Drop Down 2").Value = _
Worksheets("Sheet1").DropDowns("Drop Down 1").Value
End Sub

Sub DropDown2_Change()
Worksheets("Sheet1").DropDowns("Drop Down 1").Value = _
Worksheets("Sheet2").DropDowns("Drop Down 2").Value
End Sub

adjusting the sheet names and drop down names for your actual situation.

Rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top