Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
DropDowns and item values
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
DropDowns and item values
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. -- Regards, Tom Ogilvy wrote in message ups.com... 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
DropDowns and item values
This worked:
drp.List(drp.ListIndex) |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
DropDowns and item values
Not for me, not with the code you showed.
that would produce "Project", not 400. -- Regards, Tom Ogilvy wrote in message ups.com... This worked: drp.List(drp.ListIndex) |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
DropDowns and item values
Right.
My bad. Thanks Tom. Tom Ogilvy wrote: Not for me, not with the code you showed. that would produce "Project", not 400. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I give numerical values to each text item in a list | Excel Discussion (Misc queries) | |||
make Pivot table show only available values in dropdowns | Excel Discussion (Misc queries) | |||
CSV values and retrieiving nth item | Excel Worksheet Functions | |||
How to build a chart with 2 values per item? | Charts and Charting in Excel | |||
Summarizing several item values in one cell | Excel Programming |