With Selection.Border
.ColorIndex = 16
.Weight = xlThin
.LineStyle = xlContinuous
End With
With Selection.Interior
.ColorIndex = 2
.PatternColorIndex = 1
.Pattern = xlSolid
End With
for a = 1 to n
next a
a = Activeworkbook.sheets.count
For b = 1 to a
sheets(b).activate
'then you need find the number of graphs
d = ActiveSheet.ChartObjects.Count
For c = 1 To d
ActiveSheet.ChartObjects(c).Activate
ActiveChart.ChartArea.Select
'INSERT THE CODE FOR COLOUR CHANGE HERE
Next c
next b
Sub GraphBGroundToWhite()
'
' GraphBGroundToWhite Macro
' Macro recorded 01/02/2005 by G Dickson
'
a = ActiveWorkbook.Sheets.Count
For b = 1 To a
Sheets(b).Activate
'then you need find the number of graphs
d = ActiveSheet.ChartObjects.Count
For c = 1 To d
ActiveSheet.ChartObjects(c).Activate
ActiveChart.ChartArea.Select
With Selection.Border
.ColorIndex = 16
.Weight = xlThin
.LineStyle = xlContinuous
End With
With Selection.Interior
.ColorIndex = 2
.PatternColorIndex = 1
.Pattern = xlSolid
End With
Next c
Next b
'
End Sub
[code]
Unfortunately, It dosen't change the background colour of the charts. Have I got it wrong?
Any suggestions?