Hi I am trying to change the font size of the Charts and not abble to do so. Can somebody help me on the same.
I want to change the chart font size
and
want to remove the gridlines from the chart. Given below is the code which i did till now. Please help.
Global r As Double
Global g As Double
Global b As Double
Sub ChartPPT()
Dim chSeries As Series
e = ActiveWindow.View.Slide.SlideIndex
Set cht = ActivePresentation.Slides(e).Shapes(1).Chart
Name$ = ActiveWindow.Selection.ShapeRange(1).Name
e = ActiveWindow.View.Slide.SlideIndex
Set cht = ActivePresentation.Slides(e).Shapes(Name$).Chart
'ActivePresentation.Slides(e).Shapes(Name$).Chart.
'ActiveWindow.Selection.ShapeRange(1).Chart.ChartArea.Format.TextFrame2.TextRange.Font.Name
With cht
ser_cnt = .SeriesCollection.Count
'With ActivePresentation.Slides(e).Shapes(1).Chart..TextFrame.TextRange.Font
.Size = 16
.Bold = msoTrue
End With
For j = 1 To ser_cnt
If .HasAxis(xlValue, xlSecondary) = True Then
'.Chart.Axes(xlSecondary).
End If
If .HasAxis(xlValue, xlPrimary) = True Then
'objCht.SeriesCollection(j).Points(ser_cnt).DataLabel.Font.Size = 8
End If
If j = 1 Then
r = 64
g = 152
b = 173
ElseIf j = 2 Then
r = 191
g = 221
b = 228
ElseIf j = 3 Then
r = 170
g = 98
b = 170
ElseIf j = 4 Then
r = 227
g = 202
b = 227
ElseIf j = 5 Then
r = 189
g = 180
b = 148
ElseIf j = 6 Then
r = 233
g = 233
b = 219
ElseIf j = 7 Then
r = 155
g = 201
b = 64
ElseIf j = 8 Then
r = 222
g = 234
b = 191
ElseIf j = 9 Then
r = 64
g = 102
b = 170
ElseIf j = 10 Then
r = 191
g = 204
b = 227
End If
.SeriesCollection(j).Format.Fill.ForeColor.RGB = RGB(r, g, b)
'.SeriesCollection(j).Format.Font
Next j
End With
'End Function
End Sub