VBA(Excel 2007)如何检测SeriesCollection的填充格式?

发布于 2024-11-29 09:21:40 字数 296 浏览 0 评论 0原文

如何检测SeriesCollection的填充格式? 我知道如何将其更改为固体> ActiveChart.SeriesCollection(1).Fill.Solid

我知道如何将其更改为 Gradient > ActiveChart.SeriesCollection(1).Fill.TwoColorGradient Style:=msoGradientHorizo​​ntal, Variant:=1

但我不知道如何检测当前的填充格式... 你能帮我吗?

谢谢。

how can I detect fill format of SeriesCollection?
I know how to change it to solid > ActiveChart.SeriesCollection(1).Fill.Solid

and I know how to change it to Gradient > ActiveChart.SeriesCollection(1).Fill.TwoColorGradient Style:=msoGradientHorizontal, Variant:=1

But I dont know how to detect the current fill format...
Can you help me please?

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

乜一 2024-12-06 09:21:40

你可以测试:

if ActiveChart.SeriesCollection(1).Fill.GradientColorType = msoGradientTwoColors then
  'your code

你可以在调试器中查看对象的属性(我在帮助中找到这个对象时遇到了一些麻烦)。在这种特殊情况下,我正在监视:ActiveChart.SeriesCollection(1)。然后,您可以展开属性以查找适用于您的案例的属性。

you can test:

if ActiveChart.SeriesCollection(1).Fill.GradientColorType = msoGradientTwoColors then
  'your code

you can see the properties of an object in the debugger (i had some troubles finding this one in the help). In this particular case, i was spying: ActiveChart.SeriesCollection(1). Then, you can expand the properties to find which one apply to your case.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文