Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,564
- Office Version
- 365
- 2016
- Platform
- Windows
Hi have this code which (i think should) create a named range based on a dynamic range of cells.
When I run my code, I reference the Excel's 'Name Manager', and see that the name exists (nr_dsr). However, unlike my other named ranges in the workbook, the Value simply shows {...}, and Refers To shows ={"value1";"value2";"v...}. Are these expected results? If not, have I created my named range wrong?
I want to use this named range as the source of a combobox dropdown. My next question though, if my named ranged (nr_dsr) is correct, how can I append unique values to the combobox list in addition to the values of the named ranged. I wish to add "NA" and "NR" to the list created by the contents of the named ranged in my combobox dropdown.
Code:
rng_dsr = .Range("A2:A" & drow)
ThisWorkbook.Names.Add Name:="nr_dsr", RefersTo:=rng_dsr
When I run my code, I reference the Excel's 'Name Manager', and see that the name exists (nr_dsr). However, unlike my other named ranges in the workbook, the Value simply shows {...}, and Refers To shows ={"value1";"value2";"v...}. Are these expected results? If not, have I created my named range wrong?
I want to use this named range as the source of a combobox dropdown. My next question though, if my named ranged (nr_dsr) is correct, how can I append unique values to the combobox list in addition to the values of the named ranged. I wish to add "NA" and "NR" to the list created by the contents of the named ranged in my combobox dropdown.