Excel --- Physical dimensions of a chart object

N

Nimmi Srivastav

Is there a way to know the physical dimensions of a chart object on a
worksheet? I have data in several worksheets and I would like all my
charts to be of the same size (obviously this means that data with a
smaller range of values will be more spread out than data with a larger
range of values).

Thanks,
Nimmi
 
G

Gary''s Student

This is just an example:

Sub Macro2()
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.ChartArea.Select
n = ActiveSheet.Shapes("Chart 1").Width
m = ActiveSheet.Shapes("Chart 1").Height
MsgBox (n & " BY " & m)
End Sub

Note that you have to activate the chart AND select the ChartArea.
 
Top