Per Olander
New Member
- Joined
- Dec 21, 2011
- Messages
- 2
I am having a hard time figuring how to change the color of all the different text groups in a chart, header, axis, labels etc, and even the macro recorder has failed me this time - I have recorded the following, where I selected the graph, changed textcolor to white and then ended the recording - but without changing anything in the code, it returns an error on the second line (starting with "with"):
Run-time error '-2147024809 (80070057)':
The value is outside of the boundaries (translated from danish)
ActiveSheet.ChartObjects("Chart1").Activate
With ActiveSheet.Shapes("Chart1").TextFrame2.TextRange.Font.Fill
.Visible = msoTrue
.ForeColor.ObjectThemeColor = msoThemeColorBackground1
.ForeColor.TintAndShade = 0
.ForeColor.Brightness = 0
.Transparency = 0
.Solid
End With
From what I have read, it might be something with the textframe2 property, can anyone please help me?
Run-time error '-2147024809 (80070057)':
The value is outside of the boundaries (translated from danish)
ActiveSheet.ChartObjects("Chart1").Activate
With ActiveSheet.Shapes("Chart1").TextFrame2.TextRange.Font.Fill
.Visible = msoTrue
.ForeColor.ObjectThemeColor = msoThemeColorBackground1
.ForeColor.TintAndShade = 0
.ForeColor.Brightness = 0
.Transparency = 0
.Solid
End With
From what I have read, it might be something with the textframe2 property, can anyone please help me?