I have a spreadsheet that has a load of charts in and I need to apply a template to them all.
This is the code I'm currently using:
When I run it I get an error message that says:
Run-time error '1004':
Method 'ApplyChartTemplate' of object '_Chart' failed.
What do I need to do to get this to work?
This is the code I'm currently using:
Code:
Sub SetChartFormat()
Dim Cht As ChartObject
For Each Cht In ActiveSheet.ChartObjects
Cht.Chart.ApplyChartTemplate ( _
"C:\Users\person\AppData\Roaming\Microsoft\Templates\Charts\RAG.crtx")
Next Cht
End Sub
When I run it I get an error message that says:
Run-time error '1004':
Method 'ApplyChartTemplate' of object '_Chart' failed.
What do I need to do to get this to work?