The following code puts all the charts right next to eachother. I have played around with the code, and can't seem to get them to space out.
Sub LineUpMyCharts()
Dim MyWidth As Single, MyHeight As Single
Dim NumWide As Long
Dim iChtIx As Long, iChtCt As Long
Sheets("Figs").Activate
MyWidth = 660
MyHeight = 430
NumWide = 4
iChtCt = ActiveSheet.ChartObjects.Count
For iChtIx = 1 To iChtCt
With ActiveSheet.ChartObjects(iChtIx)
'The next two lines position each chart exactly next to each other
.Left = iChtIx - 1 * MyWidth + NumWide
.Top = iChtIx - 1 * MyHeight + NumWide
End With
Next
End Sub
What would I need to change to get space between each chart?
Any help would be greatly appreciated!!!
Thanks,
Chilly442
Sub LineUpMyCharts()
Dim MyWidth As Single, MyHeight As Single
Dim NumWide As Long
Dim iChtIx As Long, iChtCt As Long
Sheets("Figs").Activate
MyWidth = 660
MyHeight = 430
NumWide = 4
iChtCt = ActiveSheet.ChartObjects.Count
For iChtIx = 1 To iChtCt
With ActiveSheet.ChartObjects(iChtIx)
'The next two lines position each chart exactly next to each other
.Left = iChtIx - 1 * MyWidth + NumWide
.Top = iChtIx - 1 * MyHeight + NumWide
End With
Next
End Sub
What would I need to change to get space between each chart?
Any help would be greatly appreciated!!!
Thanks,
Chilly442