jmckeone
Well-known Member
- Joined
- Jun 3, 2006
- Messages
- 550
I am trying to make a code that will cause a chart to remain its present size despite changes in columns or rows. Got this from recording a macro but want to change code to a generic format so I can run it on any chart and not just 'Chart19'
Even better would be code that would cycle through all charts on a tab and apply this macro to them as well.
Thanks in advance for any assistance.
Even better would be code that would cycle through all charts on a tab and apply this macro to them as well.
Thanks in advance for any assistance.
Code:
Sub ChartFixSize()
'
' ChartFixSize Macro
' Select chart and then run this macro to make it so that it does not resize when rows or
' columns are changed. 10/10/2006 by Jon
'
'
With Sheets("Sheet1").DrawingObjects("Chart 19")
.Placement = xlMove
.PrintObject = True
End With
Sheets("Sheet1").DrawingObjects("Chart 19").Locked = True
End Sub