Consulting

Results 1 to 5 of 5

Thread: Dropdown Box Loop

  1. #1

    Dropdown Box Loop

    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!

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    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?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    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.

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    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?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    Essentially, yes, but before saving each copy, the combobox selection needs to also be changed to the value from the list in File1.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •