PDA

View Full Version : Dropdown Box Loop



pliskers
07-02-2009, 07:49 AM
I have a list of items in an Excel file (File1.xls), each of which appears in a dropdown box in a separate file (File2.xls). I need a looping code that will:

1) Go through the list in File1.xls and for each item
2) Change the dropdown list (in File2.xls) to the sequential item, and
3) Save File2.xls with the dropdown item appended to the file name.

I'm just getting into loops and haven't coded much with dropdown box objects - would appreciate anyone's help with this.

Thank you!

Bob Phillips
07-02-2009, 08:16 AM
What sort of dropdowns, forms, data validation, combobox on a sheet?

What does '... Change the dropdown list (in File2.xls) to the sequential item' mean?

pliskers
07-02-2009, 08:25 AM
It's a combo box. I just want a loop that will create a separate file for each item in the list within File1, done by going to File2 and selecting from the ComboBox the items within the File1 list. Hope that clears it up, and thanks for the help.

Bob Phillips
07-02-2009, 08:53 AM
Forms or control combobox?

ARe you saying you just want to create a copy of File2 for each element in the combo, with the combo value appended to the name?

pliskers
07-02-2009, 09:23 AM
Essentially, yes, but before saving each copy, the combobox selection needs to also be changed to the value from the list in File1.