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 Shape
s.
您可以使用Window
对象的RangeSelection
属性(请参阅此内容 )。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.