Hi All,
Trying to loop through 72 charts on a single worksheet to update the border color on them. My VBA code fails with a "Type mismatch" on the beginning of the With. Little help please? Code below.
Trying to loop through 72 charts on a single worksheet to update the border color on them. My VBA code fails with a "Type mismatch" on the beginning of the With. Little help please? Code below.
Code:
Sub PivotBorder() Dim MyChart As ChartObject
For Each MyChart In ActiveSheet.ChartObjects
MyChart.Activate
With ActiveSheet.Shapes(MyChart).Line
.Visible = msoTrue
.ForeColor.RGB = RGB(63, 63, 63)
.Transparency = 0
End With
Next MyChart
End Sub