Hi All,
I need a function which change the height and width of all the charts in the active sheet.
Thanx in Adavance.
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
Cheers !
Excel Range to BBCode Table
Use Social Networking Tools If You Like the Answers !
Message to Cross Posters
@ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)
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.
xl2007 - Windows 7
xl hates the 255 number
Bookmarks