Reputation: 33
I have created a chart on Excel using macros. Each of the shapes on the chart is filled with a color according to its category. I was wondering if it is possible to use the color of the shapes in an If/Then case to perform different actions, such as displaying the shapes with specific colors only. For example, something similar to:
If shape.Fill.ForeColor.SchemeColor = 1 Then
shape.delete
I have tried that, but it doesn't seem to do anything to my chart. Does anyone have an idea of how to do it?
Thank you !!
Upvotes: 0
Views: 689
Reputation: 563
Did you try checking the color with the corresponding RGB value? Since SchemeColor depends on the current color scheme it might be looking for a different color than you'd expect
Upvotes: 3