-
Axis Ticklables to ObjectThemeColor
I am trying to change the font color of the axis labels to a theme color rather than an RGB color but cannot get the right syntax. I am doing this in Word but assume same would apply in Excel.
Set objShape = ActiveDocument.InlineShapes.AddChart(XlChartType.xlBarClustered)
If objShape.HasChart Then
With objShape.Chart
.SetSourceData Source:="'Sheet1'!$A$1:$D$5"
.Axes(xlCategory).TickLabels.Font.Color = RGB(64, 64, 64) 'this works
.Axes(xlCategory).TickLabels.Format.Font.Fill.ForeColor.ObjectThemeColor = msoThemeColorText2 'this doesn't
End With
End If
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules