line and bar charts
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Line and bar charts with secondary axis

Line and bar charts with secondary axis

resolvedResolved · Medium Priority · Version 2003

replyReply Fri 16 Jan 2009, 15:10Delegate Katy said...

Katy has attended:
Excel VBA Advanced course

Line and bar charts with secondary axis

In VB what code do I need to create a chart with a secondary axis? Once created how then can I change the chart type for the data on the primary axis to a bar chart and the data on the secondary axis to a line chart?

For upcoming training course dates see: Pricing & availability

replyReply Wed 21 Jan 2009, 15:43Trainer Stephen said...

RE: Line and bar charts with secondary axis

Hi Katy

Thankyou for your question

After some experimenting i have found the following code snippet which selects a series in a chart and then plots it against a secondary axis

ActiveChart.SeriesCollection(5).Select
ActiveChart.SeriesCollection(5).AxisGroup = 2


As you can see the series is identified by its index number in the collection and then sets the axisgroup property to 2

Hope this helps

Regards

Stephen

Wed 28 Jan 2009: Automatically marked as resolved.

 

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

Excel tip:

3D formulas find and replace

After you know all the components of a 3D reference, you can change them to suit by using a localised Find and replace crt+f, if need be.

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard