Thanks a lot but this only works for chartobjects within a sheet
my problem concerns also charts within graph sheets where there is no
chartobjects
in this case it seems that I must use the "ActiveChart.ChartArea" object and
its height/width is not writable
--
Patrick. Elhorga )
Project Manager
Geosciences Software Division
Beicip Franlab
tel: 33 (0)5 59 80 18 75
fax: 33 (0)5 59 84 42 96
___________________________________
Visit our Web site at
http://www.beicip.com/
"Tom Ogilvy" a écrit dans le message de news:
...
why not just set the height of the ChartObject
ActiveSheet.ChartObjects("Graphique 1").Height = hauteur + 5
--
Regards,
Tom Ogilvy
"Patrick Elhorga" wrote in message
...
Hi All,
I'm trying, using a VBA macro, to set the ChartArea.Height property of an
Excel Graph object
but I'm getting the following error:
Run-time error '1004': Unable to set the Height of the ChartArea class
According to the MSDN documentation the Width is a read-write
My code is below. If anyone can shed some light on this it would be
greatly
appreciated.
I'm using Excel Small Business 2003
Regards,
Patrick
Sub Macro1()
''
Dim hauteur As Double
'
hauteur = 400#
ActiveSheet.ChartObjects("Graphique 1").Activate
ActiveChart.ChartArea.Select
ActiveChart.ChartArea.Height = hauteur
End Sub