I have a Worksheet, with a Chart in it. If I select a range of cells, and then I select the Chart, then in the immediate window of the VBE
? TypeName(Selection) ChartArea
So I cannot use
Selection to get the selected
Range, even if it is there (pressing Esc returns to the selected range of cells).
How can I retrieve that
Range in VBA?
PS: I suspect the same Q&A applies to other
You can use the
RangeSelection property of the
Window object (see this).