+ Reply to Thread
Results 1 to 3 of 3

X-axis trouble

  1. #1
    Registered User
    Join Date
    11-25-2005
    Posts
    27

    [Solved] X-axis trouble

    I'm using the below code to try to define the min and max of the x range on a chart with two numbers that I have dynamically named in a cell (Chart_Date_Pmonth and Chart_Date_Tmonth). These numbers change over time. However, I cannot get the code to accept these named variables.

    Please Login or Register  to view this content.
    Last edited by BrianDP1977; 12-05-2005 at 08:15 PM.

  2. #2
    Wolf
    Guest

    RE: X-axis trouble

    Hi Brian,

    I suppose you variables are defined as "Range", therefore please try

    Set ActiveChart.Axes(xlValue).MinimumScale = range("Chart_Date_Pmonth").value
    Set ActiveChart.Axes(xlValue).MaximumScale = range("Chart_Date_Tmonth").value

    Best regards

    Wolf

    "BrianDP1977" wrote:

    >
    > I'm using the below code to try to define the min and max of the x range
    > on a chart with two numbers that I have dynamically named in a cell
    > (Chart_Date_Pmonth and Chart_Date_Tmonth). These numbers change over
    > time. However, I cannot get the code to accept these named variables.
    >
    >
    > Code:
    > --------------------
    > ActiveChart.Axes(xlValue).Select
    > Set ActiveChart.Axes(xlValue).MinimumScale = Chart_Date_Pmonth
    > Set ActiveChart.Axes(xlValue).MaximumScale = Chart_Date_Tmonth
    > --------------------
    >
    >
    > --
    > BrianDP1977
    > ------------------------------------------------------------------------
    > BrianDP1977's Profile: http://www.excelforum.com/member.php...o&userid=29110
    > View this thread: http://www.excelforum.com/showthread...hreadid=490530
    >
    >


  3. #3
    Registered User
    Join Date
    11-25-2005
    Posts
    27
    Yep, that does it. I got it figured out at about the same time you did. Thank you very much for the help.

+ 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