开发者

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

开发者 https://www.devze.com 2023-03-27 21:04 出处:网络
how can I detect fill format of SeriesCollection? I know how to change it to solid > ActiveChart.SeriesCollection(1).Fill.Solid

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

精彩评论

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

关注公众号