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.
RE: Graphs
Hi James
Thank you for your question
The following code will size and position a chart once it is created
With aChart
.ChartArea.Width = 600
.ChartArea.Height = 400
With .Parent
.Top = Range("K21").Top
.Left = Range("K21").Left
End With
End WithThe 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