如何在 VBA 中列出图表对象的属性?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16066878/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-11 20:39:59  来源:igfitidea点击:

How to list properties of a chart object in VBA?

excelvbacharts

提问by Eduard Florinescu

I want to clone(using VBA) some charts and be able to change them for that I need to know what they contain.

我想克隆(使用 VBA)一些图表并能够更改它们,因为我需要知道它们包含什么。

How to list properties of a chart object in VBA, more like an object dump in other languages?

如何在 VBA 中列出图表对象的属性,更像是其他语言中的对象转储?

回答by David Zemens

In the VBE, use the Locals window:

在 VBE 中,使用本地窗口:

Screenshot of partial view of Locals window for Chart

图表的局部窗口部分视图的屏幕截图

You can then copy any existing charts, and simply manipulate the properties that need to be changed for each, or you can create new charts on-the-fly, setting the properties as needed.

然后,您可以复制任何现有图表,并简单地操作需要为每个图表更改的属性,或者您可以即时创建新图表,根据需要设置属性。