+ Reply to Thread
Results 1 to 3 of 3

VBA- X axis below axis (with negative values)

  1. #1
    Registered User
    Join Date
    07-16-2012
    Location
    U.S
    MS-Off Ver
    Excel 2007
    Posts
    34

    VBA- X axis below axis (with negative values)

    Hello,

    I'm running across a problem with adjusting my Line Chart's X Axis. The line Chart has positive and negative values, so the X axis is in the middle of the chart, by default. I want my macro to move the X-axis beneath the data/chart, but I'm having frustrating issues. This code selects the line chart, goes to the X-axis categories, then tries to change the X axis to xlLow...but the debugger catches on the last line every time. Is there a workaround that anyone knows of? I see a lot of people online have this issue as well, but I couldn't find any good solutions. Even if I can't move it below, moving it above the data would work too...just anywhere but the middle.

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor wallyeye's Avatar
    Join Date
    05-06-2011
    Location
    Arizona
    MS-Off Ver
    Office 2010, 2007
    Posts
    308

    Re: VBA- X axis below axis (with negative values)

    If I had to guess, I think the activate mid-stream is causing the issue:

    Please Login or Register  to view this content.
    or simply:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-16-2012
    Location
    U.S
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: VBA- X axis below axis (with negative values)

    Flawless victory. The first code you posted worked best. Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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