JoeMajestee
New Member
- Joined
- Jul 15, 2009
- Messages
- 49
I would like to do something with a shape I put on top of a chart by selecting the chart, hitting insert, then an oval. Or something.
If the shape is not connected to the chart, the code is something like this:
and I can toggle it as needed.
However if I insert onto the chart it seems much more convoluted. I recorded changing the color of my shape and got this:
It seems I should be able to manipulate the color of the second shape, "Oval 1" in a similar way, with one or two lines and no selecting.
Most likely I would like to have a couple shapes on the chart that become visible or not based on a goal being met or not. In essence, up arrow is good down arrow is bad.
My ultimate goal is to have the chart embedded in a powerpoint running in kiosk mode which updates as the excel data changes. Bonus for someone who can help with that!
Thanks.
If the shape is not connected to the chart, the code is something like this:
VBA Code:
Sheets("Name").Shapes("Oval 6").Fill.ForeColor.RGB = vbGreen
However if I insert onto the chart it seems much more convoluted. I recorded changing the color of my shape and got this:
Code:
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.Shapes.Range(Array("Oval 1")).Select
With Selection.ShapeRange.Fill
.Visible = msoTrue
.ForeColor.ObjectThemeColor = msoThemeColorAccent4
.ForeColor.TintAndShade = 0
.ForeColor.Brightness = 0
.Transparency = 0
.Solid
End With
It seems I should be able to manipulate the color of the second shape, "Oval 1" in a similar way, with one or two lines and no selecting.
Most likely I would like to have a couple shapes on the chart that become visible or not based on a goal being met or not. In essence, up arrow is good down arrow is bad.
My ultimate goal is to have the chart embedded in a powerpoint running in kiosk mode which updates as the excel data changes. Bonus for someone who can help with that!
Thanks.