Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Graphs
Graphs
Resolved · Low Priority · Version 2003
James has attended:
Access VBA course
Excel VBA Advanced course
Graphs
Afer making a graph and displaying it on the sheet with the data table. Is there a way of positioning and sizing the graph in vba.
For upcoming training course dates see: Pricing & availability
RE: Graphs
Hi James
Thank you for your question
The following code will size and position a chart once it is created
With aChart End With
.ChartArea.Width = 600
.ChartArea.Height = 400
With .Parent
.Top = Range("K21").Top
.Left = Range("K21").Left
End With
The size of the chart can be altered by using the width and height properties of the chartarea object.
The position of the chart is fixed by using the top and left properties of the chart'sm parent object. This refers to the worksheet that the chart is located in.
Hope this helps
Regards
Stephen
Mon 12 Jan 2009: Automatically marked as resolved.
|
