+ Reply to Thread
Results 1 to 7 of 7

VBA Graph Formatting

  1. #1
    Forum Contributor
    Join Date
    05-26-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    682

    VBA Graph Formatting

    Hi, I wonder whether someone may be able to help me please.

    With help and guidance from @Andy Pope at this posthttp://www.excelforum.com/excel-prog...bar-chart.html I've been able to put together a short script (below) which creates a 'Stacked Bar' chart'.

    Please Login or Register  to view this content.
    I'm now looking to extend this a little by including further formatting and customisation of the chart.

    I thought I'd start off relatively simple by reversing the order of the 'y' axis', and so through recording this, I know that I need to include the following line of code:
    Please Login or Register  to view this content.
    As you can see for the script above I've tried to implement this line, but when I run the macro I receive a '438' Run time error and I'm not sure why.

    I just wondered whether someone may be able to look at this please and let me know where I'm going wrong.

    Many thanks and kind regards

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: VBA Graph Formatting

    That line must be after the first 'End With' line because it refers to a property of the Chart, not the Series.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  3. #3
    Forum Contributor
    Join Date
    05-26-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    682

    Re: VBA Graph Formatting

    HI @Izandol, thank you very much for taking the time to reply to my post.

    I've made the changes as you suggest, but unfortunately I'm still receiving the same error.

    Kind Regards

  4. #4
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: VBA Graph Formatting

    Please post revised code for checking.

  5. #5
    Forum Contributor
    Join Date
    05-26-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    682

    Re: VBA Graph Formatting

    Hi @Izandol, please find my revised code below:

    Please Login or Register  to view this content.
    Many thanks and kind regards

  6. #6
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: VBA Graph Formatting

    This is my fault - I did not notice one of your With blocks. Code must be:
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    05-26-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    682

    Re: VBA Graph Formatting

    Hi @Izandol, you have absolutely no need to apologise, your help is gratefully received and the solution works great.

    All the best and kind regards

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Graph formatting
    By miggy79 in forum Excel General
    Replies: 0
    Last Post: 02-28-2013, 01:39 PM
  2. Pivot Table graph looses formatting after running formatting macro
    By arthurbr in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-27-2011, 04:16 AM
  3. Excel 2007 : Bar Graph Formatting
    By mulcahcf in forum Excel General
    Replies: 0
    Last Post: 05-10-2010, 03:26 PM
  4. Graph formatting
    By mark-ainsworth in forum Excel General
    Replies: 1
    Last Post: 03-06-2010, 08:58 PM
  5. 3D Graph Formatting
    By SamuelT in forum Excel General
    Replies: 1
    Last Post: 10-14-2005, 05:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1