View Full Version : Excel VBA: Syncronising two Form drop downs and displaying the contents in a text box


Rabbitoh
07-16-2007, 04:54 PM
Scenario:

I have two columns on a worksheet, the contents of which relate to each other e.g.

01 Name1....etc.
02 Name2....etc
03 Name3....etc

I have a Form with two drop down lists.

The drop downs relate to the entries in the two columns side by side respectively.

Objective:

I want to select an entry from either drop down list (e.g. "01" or "Name 1....etc") and have the full contents of the corresponding second column only display in the other drop-down field e.g. if I select "02" then the other drop down field displays "Name 2...etc".

If however I select "Name 2..etc" from it's drop down list first, then I also want the other drop down list to syncronise and display the corresponding column entry e.g. "02". (could even have them going both ways)

Can anyone provide me with the code to do this please?

I am open to suggestions on variations as long as the end result - which is to have the related contents selected for the two corresponding entries, displayed on the same FORM.

shades
07-17-2007, 09:28 AM
Howdy. This can be done with dependent lists for validation rather than forms. Depends on how many items will be in the lists.
________
Mazda bongo picture (http://www.ford-wiki.com/wiki/Mazda_Bongo)

qafself
07-18-2007, 05:49 AM
See this site for help on dependent lists

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

Ed