Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell link via macro?
Hi,
I´d like to get the value of item, selected in the list, but I have not filled in the "Cell link". Have anyone any idea, how to get the value from macro, without filling "Cell link"? I know the name of the element, but it has no properties like Value or Text... Thanks for any advice.... |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell link via macro?
If it is a data validation list then just read the cell where the list is
located MyValue = Range("A1") "Dori" wrote: Hi, I´d like to get the value of item, selected in the list, but I have not filled in the "Cell link". Have anyone any idea, how to get the value from macro, without filling "Cell link"? I know the name of the element, but it has no properties like Value or Text... Thanks for any advice.... |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell link via macro?
Thanks, but the list is not located in any cell. I have list (?drop down box)
which items are defined by cells range ("Input Range" in the format control). Does anybody know? Joel pÃ*Å¡e: If it is a data validation list then just read the cell where the list is located MyValue = Range("A1") "Dori" wrote: Hi, I´d like to get the value of item, selected in the list, but I have not filled in the "Cell link". Have anyone any idea, how to get the value from macro, without filling "Cell link"? I know the name of the element, but it has no properties like Value or Text... Thanks for any advice.... |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell link via macro?
This code should help. The LISTINDEX starts at 0 for first item in the list
box Sub test() ActiveSheet.ListBox1.Clear ActiveSheet.ListBox1.AddItem "abc" ActiveSheet.ListBox1.AddItem "def" ActiveSheet.ListBox1.ListIndex = 1 SelectedItem = ActiveSheet.ListBox1.ListIndex End Sub "Dori" wrote: Thanks, but the list is not located in any cell. I have list (?drop down box) which items are defined by cells range ("Input Range" in the format control). Does anybody know? Joel pÃ*Å¡e: If it is a data validation list then just read the cell where the list is located MyValue = Range("A1") "Dori" wrote: Hi, I´d like to get the value of item, selected in the list, but I have not filled in the "Cell link". Have anyone any idea, how to get the value from macro, without filling "Cell link"? I know the name of the element, but it has no properties like Value or Text... Thanks for any advice.... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I use Cell Link in Macro? | Excel Programming | |||
How do I use Cell Link in Macro? | Excel Programming | |||
I want to link a cell in the macro | Excel Discussion (Misc queries) | |||
Link cell contents to a Macro? | Excel Programming | |||
Link a macro to a cell value | Excel Programming |