Hi All,
I need a function which change the height and width of all the charts in the active sheet.
Thanx in Adavance.
Printable View
Hi All,
I need a function which change the height and width of all the charts in the active sheet.
Thanx in Adavance.
Hi,
and call likeCode:Sub FixChartSize(ByVal cHeight As Single, cWidth As Single, Optional ByRef Chart_Object As ChartObject, Optional ByRef Sht As Worksheet)
Dim i As Long
Dim c As Long
If Sht Is Nothing Then Set Sht = ActiveSheet
If Chart_Object Is Nothing Then
c = Sht.ChartObjects.Count
If c Then
For i = 1 To c
With Sht.ChartObjects(i)
.Height = cHeight
.Width = cWidth
End With
Next
End If
Else
With Chart_Object
.Height = cHeight
.Width = cWidth
End With
End If
End Sub
FixChartSize 350, 700
Mohan
You should check the chart sizer under cool code - you will luv it. You simply click on a chart - it then maximizes - you click again it minimizes.
Thanx for this useful function.
Working!
:cool: