excel charts using vba
Microsoft Office Training verified by visa - mastercard securecode about microsoft training company london ukadd this page to your favourites/bookmarksAdd to favourites
view a printable version of this pagePrintable version
email this page to somebodyEmail this page
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and Help » Excel Charts using VBA

Excel Charts using VBA

The UK's most regular instructor-led training courses.
Training information: excel 2003 training · Excel course · VBA courses London

resolvedResolved · Low Priority · Version 2003

Excel Charts using VBA

Monique has attended:
Excel VBA course

by - delegate Monique [1 post] (2008 Aug 26 Tue, 16:26) replyReply

Is it possible to create charts in Excel using VBA. For example, having created a PivotTable in VBA with yearly totals, can you plot a chart of these values?

Excel VBA 2 day course
Version Date Location Places
available
Book Next place rate:
Card Invoice
2007 2008 Nov 25 Tue + 26 Wed Bayswater 6 book now £455 £515
2003 2008 Nov 26 Wed + 27 Thu Bloomsbury 2 book now £495 £495
2003 2008 Dec 1 Mon + 2 Tue Bloomsbury 2 book now £495 £495
2003 2008 Dec 4 Thu + 5 Fri Bloomsbury 5 book now £450 £485
2007 2008 Dec 11 Thu + 12 Fri Bayswater 5 book now £475 £515
2007 2009 Jan 8 Thu + 9 Fri Bloomsbury 6 book now £450 £475
Full Schedule: See all 37 Excel VBA course dates.
Bookings currently available until 26th November 2009.

RE: Excel Charts using VBA

by - trainer Laura silver contributer[86 posts] (2008 Sep 17 Wed, 10:40) replyReply

You can do almost anything in VBA that you can do as an Excel user. The easiest way to find out how the code will look is to record the code of producing the chart and then take a look at the code and work from there.

I recorded creating a chart from a pivot table and got the following code. My pivot table was on Sheet4 and A6 was inside it.

Sub Macro2()
Charts.Add
ActiveChart.SetSourceData Source:=Sheets("Sheet4").Range("A6")
ActiveChart.Location Where:=xlLocationAsNewSheet
End Sub

Formatting the chart to appear as you need is another record a macro and see what it does and tweak it to suit your needs.

Laura GB


Related articles

· Creating Charts with Excel
· Creating Smarter, Customized Invoices for your Small Business with Microsoft Excel
· Microsoft Excel Training Course
· Fun Things I've Done With Excel
· Why Should I Learn Visual Basic in Excel?

Please browse our web site to find out more about
excel 2003 training and other Microsoft training courses.

Excel tip:

Deleting a range of cells using the autofill handle

Firstly, select the range of cells for which you would like to clear the contents. Then drag the autofill handle to the the top left corner of the selection whilst holding down the shift key. Your selected contents should then be deleted.

View all Excel hints and tips

Institute of IT Training - Accredited Training Provider Microsoft Certified Partner
microsoft office
Microsoft Office Specialist Authorised Testing Centre (MOS and MCAS)

Prodigy Platinum Learning Partner

Institute of IT Training - Accredited Training Provider Association of Computer Trainers Valid HTML 4.01 Transitional
Valid CSS Markup

secure online payments - visa - mastercard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Training by application Main information pages See also

Access courses
DreamWeaver courses
Excel courses
MS Project courses
Outlook courses
PowerPoint courses
VBA courses
Word courses
(more...)

Public scheduled courses
On-site training
Closed company courses

Microsoft Office training
Pricing and availability
Training schedule
Training venues

Access training
Dreamweaver training
Excel training
MS Project training
PowerPoint training

London Computer Training
Computer Training London

Microsoft Access training
Microsoft Excel training
Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training

Time Management Course London

Interested in Access training? Please see the following pages:
microsoft access courses · microsoft training access course
microsoft+access+training · access courses in london

Training Information

Training Articles

AddThis Social Bookmark Button What's this?
Add to Del.icio.us Add to Facebook Add to Digg Add to Reddit Add to Google Add to Yahoo Add to Diigo Add to Mr. Wong Add to Linkarena Add to Power Oldie Add to Folkd Add to Jumptags Add to Upchuckr Add to Simpy Add to StumbleUpon Add to Slashdot Add to Netscape Add to Furl Add to Spurl Add to Blinklist Add to Blogmarks Add to Technorati Add to Newsvine Add to Blinkbits Add to Ma.Gnolia Add to Smarking Add to Netvouz