InputBox to resize all charts of active worksheet
Sub ResizeCharts()
Dim myChtObj As ChartObject
Dim myInput As String
'This conversion factor found in net(Not checked with other resources)
Const PoiToCm = 0.035277778
myInput = Application.InputBox(Prompt:="New Width for all charts.", _
Title:="ENTER NEW WIDTH FOR ALL CHARTS",
Default:=ActiveSheet.ChartObjects(1).Width * PoiToCm, Type:=1)
For Each myChtObj In ActiveSheet.ChartObjects
myChtObj.Width = myInput / PoiToCm
Next myChtObj
End Sub
|