开发者

VBA (Excel 2007) how can I detect fill format of SeriesCollection?

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.TwoColorGradie开发者_JAVA技巧nt Style:=msoGradientHorizontal, Variant:=1

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

Thank you.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜