+ Reply to Thread
Results 1 to 3 of 3

Using VBA to change axis on a chart

  1. #1
    Registered User
    Join Date
    03-24-2011
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2007
    Posts
    35

    Using VBA to change axis on a chart

    Hi all,

    I'm trying to use VBA to adjust the axis of a chart, setting a MIN and MAX value and an axis value for the vertical axis crosses. My code is as follows

    Please Login or Register  to view this content.
    With this code, I can see the values change in the command bar however it is not applying the change to the chart? My chart is called Chart 18

    Picture1.jpg

    Many Thanks

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Using VBA to change axis on a chart

    You will need to post example file as we can not tell exactly what is happening from a picture.

    Assume the chart object is correctly named as that would through an error.
    Is that axis the Primary horizontal axis?

    How are you running the macro?
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    03-24-2011
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: Using VBA to change axis on a chart

    The name of my chart was incorrect (lol)
    Sorry. Thanks for the suggestion!!!

+ 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. negative y axis on pivot chart but axis doesn't change
    By ammartino44 in forum Excel General
    Replies: 1
    Last Post: 06-24-2015, 02:19 PM
  2. [SOLVED] Change x-axis values on Bar Chart
    By scantor145 in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 03-11-2015, 06:45 AM
  3. Bar chart with a drop down box to change the X-axis
    By tlacloche in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-07-2014, 07:36 AM
  4. Change X axis of scatter chart
    By pleiadeez7 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-01-2009, 10:35 AM
  5. Replies: 2
    Last Post: 06-26-2006, 03:30 PM
  6. [SOLVED] how can i change position of x and y axis in chart?
    By zare-jamal in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 10-27-2005, 09:05 AM
  7. [SOLVED] How do I change X-Axis values in a chart with 2 Y-Axis?
    By ESGLCC in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-04-2005, 10:06 AM

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