Hello all,
I want to use a selected range as part of a onAction ribbon macro but cannot make it work. The process I am following is,
1. Select a range of cells
2. Select the ribbon action
3. Name my range as MyGph_range
Even though I selected 50 rows, MyGph_range is only showing =#REF!$J$6 as the 'Refers to' range in Name Manager. This is the portion of the code where it is happening.
Thanks for your help.
I want to use a selected range as part of a onAction ribbon macro but cannot make it work. The process I am following is,
1. Select a range of cells
2. Select the ribbon action
3. Name my range as MyGph_range
Even though I selected 50 rows, MyGph_range is only showing =#REF!$J$6 as the 'Refers to' range in Name Manager. This is the portion of the code where it is happening.
Code:
Sub Mygraph(control As IRibbonControl)
Dim MyGph_range As Variant
Set MyGph_range = Selection
End Sub