如何在Excel中返回嵌入图表的工作表?

时间:2014-09-24 10:29:20

标签: excel vba charts

假设我有一个图表(或图表对象),有没有办法可以访问这个图表对象的工作表。

Dim cht as Chart
Set cht = some_chart_embedded_in_worksheet

Dim ws as Worksheet
'I want to know if there is a way to get the worksheet of the embedded chart
Set ws = cht.???

谢谢!

1 个答案:

答案 0 :(得分:0)

你可以尝试

   msgbox Left(ActiveChart.Name, 6)

它会告诉你工作表名称