creating graph vba excel

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Creating a Graph in VBA for Excel

Creating a Graph in VBA for Excel

resolvedResolved · Medium Priority · Version 2003

Chris has attended:
Excel VBA Advanced course

Creating a Graph in VBA for Excel

As asked on the course, when you are creating a graph in VBA for display on an Excel worksheet, is there a way to determine the graph's size on its creation rather than having to resize (and consequently estimate the growth/reduction percentage)?

RE: Creating a Graph in VBA for Excel

Hi Chris

Thanks for the question

I have discovered that setting the width and height properties can be accessed by identifying the chart through the chart objects collection.

e.g

ActiveSheet.ChartObjects(1).Width = 600


works fine

I am still understanding how this relates to the width / height properties of the chart area etc. I will follow up when I know more

Regards

Stephen

Wed 7 Oct 2009: Automatically marked as resolved.

 

Training courses

 

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
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Display developer tab - Excel 2010

a. In Excel, click on the File tab
b. Select Options from left hand side
c. Choose the Customize Ribbon section
d. Click the box next to Developer in the list of tabs on the right hand side of the dialog box. When ticked the Developer tab will be visible.
e. Click OK to apply your changes

View all Excel hints and tips


Server loaded in 0.08 secs.