Consulting

Results 1 to 6 of 6

Thread: Vague Drop Down Menu Question - Sorry!

  1. #1
    VBAX Regular
    Joined
    Oct 2007
    Posts
    76
    Location

    Vague Drop Down Menu Question - Sorry!

    Hi, Folks.

    I know detail is king here, but I'm really trying to do something I don't know a lot about - hoping someone can help me.

    I want to create a drop down menu, who's contents are determined by another cell on the same worksheet. The purpose is to have the user select a trailer weight from a drop down list, but rather than having all trailer weights for all carriers, I want the macro to look to the carrier name cell to determine which carrier it is, then pick up the range of drop down menu items for that specific carrier off of another worksheet within the same workbook.

    Roughly put, here's the logic that I can come up with:

    If .cell(varRow, 1) = "value1" then
    .cell(varRow, 2) dropdownlist items = dropdownlist items for value1

    Else If .cell(varRow, 1) = "value2" then
    .cell(varRow, 2) dropdownlist items = dropdownlist items for value2

    And so on.... This will be in a loop to populate all cells for the entire document.

    Again, sorry to be so vague, but that's as much as I can offer. Please let me know if you need any further information. Thanks so much in advance.

    Cheers!

  2. #2
    VBAX Regular
    Joined
    Oct 2007
    Posts
    76
    Location
    Sorry, one more thing... looking at the logic example, "dropdownlist items for value2" is a range on another worksheet.

  3. #3
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    See http://www.contextures.com/xlDataVal02.html



    _________________________________________
    UK Cambridge XL Users Conference 29-30 Nov
    http://www.exceluserconference.com/UKEUC.html
    ____________________________________________
    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

  4. #4
    VBAX Regular
    Joined
    Oct 2007
    Posts
    76
    Location
    xld...glad to see you're on the case, you've helped me a bunch already, thanks.

    Is there any way I can use VBA within a macro to do this, rather than putting the formulas manually into the spreadsheet?

  5. #5
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    My version

    http://www.xldynamic.com/source/xld.Dropdowns.html


    __________________________________________
    UK Cambridge XL Users Conference 29-30 Nov
    http://www.exceluserconference.com/UKEUC.html
    ____________________________________________
    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

  6. #6
    VBAX Regular
    Joined
    Oct 2007
    Posts
    76
    Location
    Thanks...this is more what I'm looking for. Let me check this out, and I'll bug ya if I run into anything too crazy....thanks again...the number of beers should you ever make it up to Ontario is higher and higher!

    Cheers!

Posting Permissions

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