DropDowns and item values

  • Thread starter Thread starter gimme_this_gimme_that
  • Start date Start date
G

gimme_this_gimme_that

Suppose I create a dropdown as following:

Set drp = ActiveWorkbook.Sheets("Sheet1").DropDowns("GroupBy")
drp.RemoveAllItems
drp.AddItem "Group By", 232
drp.AddItem "Resource", 100
drp.AddItem "Project", 400
drp.ListIndex = 1
end Sub

If the DropDown has Project selected how do I get 400?

These return 3:

MsgBox drp.Value
MsgBox drp.ListIndex

Thanks
 
the values are not stored in the list. You would need to store them
somewhere or hard code them and figure out what the value is based on the
listindex property.
 
Not for me, not with the code you showed.

that would produce "Project", not 400.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top