+ Reply to Thread
Results 1 to 3 of 3

How do I change a Chart's axis scale from visual basic?

  1. #1
    jfiorillo
    Guest

    How do I change a Chart's axis scale from visual basic?

    How do I change a Chart's (that is on a worksheet) x-axis scale from visual
    basic?

    The following only works when the chart has its own sheet/tab.
    With Charts("Chart1").Axes(xlCategory)
    .MinimumScale = 740.25
    .MaximumScale = 746.25
    End With

    If it is located within a worksheet how do you reference it?

  2. #2
    Andy Pope
    Guest

    Re: How do I change a Chart's axis scale from visual basic?

    Hi,

    Some more like this for chartobject,

    With ActiveSheet.ChartObjects("Chart 1").Chart.Axes(xlCategory)
    .MinimumScale = 740.25
    .MaximumScale = 746.25
    End With

    Cheers
    Andy

    jfiorillo wrote:
    > How do I change a Chart's (that is on a worksheet) x-axis scale from visual
    > basic?
    >
    > The following only works when the chart has its own sheet/tab.
    > With Charts("Chart1").Axes(xlCategory)
    > .MinimumScale = 740.25
    > .MaximumScale = 746.25
    > End With
    >
    > If it is located within a worksheet how do you reference it?


    --

    Andy Pope, Microsoft MVP - Excel
    http://www.andypope.info

  3. #3
    jfiorillo
    Guest

    Re: How do I change a Chart's axis scale from visual basic?

    Thanks a bunch.
    Excellent.
    John

    "Andy Pope" wrote:

    > Hi,
    >
    > Some more like this for chartobject,
    >
    > With ActiveSheet.ChartObjects("Chart 1").Chart.Axes(xlCategory)
    > .MinimumScale = 740.25
    > .MaximumScale = 746.25
    > End With
    >
    > Cheers
    > Andy
    >
    > jfiorillo wrote:
    > > How do I change a Chart's (that is on a worksheet) x-axis scale from visual
    > > basic?
    > >
    > > The following only works when the chart has its own sheet/tab.
    > > With Charts("Chart1").Axes(xlCategory)
    > > .MinimumScale = 740.25
    > > .MaximumScale = 746.25
    > > End With
    > >
    > > If it is located within a worksheet how do you reference it?

    >
    > --
    >
    > Andy Pope, Microsoft MVP - Excel
    > http://www.andypope.info
    >


+ 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