98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum 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.
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
Mon 12 Jan 2009: Automatically marked as resolved.
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Display Formulas Instead of Results in Excel 2010By pressing Ctrl ~ once, Excel will display formulas rather than the results of the formulas. Press it again, and the results will appear again. |