+ Reply to Thread
Results 1 to 8 of 8

Macro to select an item from a data validation list

  1. #1
    Registered User
    Join Date
    10-05-2012
    Location
    oregon
    MS-Off Ver
    Excel 2007
    Posts
    5

    Macro to select an item from a data validation list

    Hi,

    I need a macro that will essentially "open up" a data validation list and select one of the items.

    I have heard that combo-boxes work for this sort of thing, but I would really like to use Data validation because that is commonly used at my company and combo-boxes may present unknown issues.

    help?

    thanks!!

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Macro to select an item from a data validation list

    Hello blindedbythepj,

    Welcome to the Forum!

    Please explain what you mean by "open up" a Data Validation list?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    10-05-2012
    Location
    oregon
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Macro to select an item from a data validation list

    Oh sorry, I just mean that I want the macro to select one of the items listed in the validation list. Open up >> click the data validation's down arrow and select one of the items.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Macro to select an item from a data validation list

    Hello blindedbythepj ,

    A Validation List normally works by allowing the user to select a single item from the drop down list. Why do you need a macro to select an item for the user?

  5. #5
    Registered User
    Join Date
    10-05-2012
    Location
    oregon
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Macro to select an item from a data validation list

    perhaps it would be better for me to explain my situation a bit.

    The purpose of the spreadsheet is to track part numbers for a list of parts within a unit. I have 3 different unit configurations, each with 30 or so unique part numbers (**some parts are interchangeable between units, this is important later). I have a macro that populates my form with the 30 part numbers for the particular unit using a user selected unit from data validation list.

    So here's what I want the form to do:

    A user will select a unit from the data validation list, a macro (the one I have already created) will populate the form with 30 part numbers.

    Those 30 part numbers will each be their own data validation list, so the user can select between 3 different parts if the unit has a non-standard configuration.


    My thought was to have my macro copy 30 data validation lists that are already setup, and select the appropriate part for the unit. So depending on which unit the user selects, there will be 30 validations lists that get populated into the form with the appropriate parts.

    ugh, does that make sense?

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Macro to select an item from a data validation list

    Hello blindedbythepj,

    I don't follow you a 100 percent, but I can say there has got to be a better way of doing this. Would it possible for you to post a copy of the workbook?

  7. #7
    Registered User
    Join Date
    10-05-2012
    Location
    oregon
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Macro to select an item from a data validation list

    Yep. I deleted some stuff, so hopefully it still makes sense. I dont have any code in it right now, but the basic concept is this:

    select a configuration, use data validation list + macro to populate part numbers (using listed part numbers below), but each part number field will still have a user editable field with the 3 listed options after configuration is selected.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    10-05-2012
    Location
    oregon
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Macro to select an item from a data validation list

    Leith,

    is there any chance you have input for me here?

    thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1