domingo, 28 de marzo de 2010

Chart area



'Este es un ejemplo de como cambiar el tamaño de chart area en varios charts

Sub SetChrtSize_Test()

Dim chtobj As ChartObject
Dim objChart As Chart

'cambiar el tamaño de chart area en el grafico activo
ActiveChart.ChartArea.Width = 1000
ActiveChart.ChartArea.Height = 80
ActiveChart.ChartArea.Interior.Color = 255

'Cambiar el tamaño de plot area
ActiveChart.PlotArea.Width = 1200
ActiveChart.PlotArea.Height = 800
ActiveChart.PlotArea.Interior.Color = 577

'Cambiar el tamaño de legend
ActiveChart.Legend.Interior.Color = 255
ActiveChart.Legend.Width = 33

'cambiar el tamaño de chart area en todos los graficos de la hoja activa (1)
For Each chtobj In ActiveSheet.ChartObjects
chtobj.Width = 250
chtobj.Height = 170
Next



End Sub