Sizing of pie charts

  • Thread starter Thread starter anupam
  • Start date Start date
A

anupam

want to size all 78 piecharts in a single worksheet of same width an
height.
There should be same gap between charts.
looking for a quick method
 
The following code would arrange the charts in two columns down the
worksheet:

'===============================
Sub SizeMoveCharts()
Dim ws As Worksheet
Dim chObj As ChartObject
Set ws = ActiveSheet
Dim i As Integer

i = 1

For i = 1 To ws.ChartObjects.Count
With ws.ChartObjects(i)
.Width = 400
.Height = 300
If i Mod 2 = 1 Then
.Left = 0
Else
.Left = 450
End If
.Top = 350 * Int((i - 1) / 2)

End With

Next i
End Sub
'=============================
 
Back
Top