+ Reply to Thread
Results 1 to 4 of 4

How do I get VBA to generate a chart with square axes?

  1. #1
    patrick
    Guest

    How do I get VBA to generate a chart with square axes?

    I have generated a chart using Excel data but wish to ensure that the chart
    is square (i.e. the x and the y axes are to the same scale). an anyone help
    please?

  2. #2
    Ardus Petus
    Guest

    Re: How do I get VBA to generate a chart with square axes?

    Try this:

    '---------
    Sub SquareChart()
    With ActiveSheet.Shapes("Graphique 1")
    .Height = .Width
    End With
    End Sub
    '---------

    Regards,
    --
    AP

    "patrick" <[email protected]> a écrit dans le message de
    news: [email protected]...
    >I have generated a chart using Excel data but wish to ensure that the chart
    > is square (i.e. the x and the y axes are to the same scale). an anyone
    > help
    > please?




  3. #3
    patrick
    Guest

    Re: How do I get VBA to generate a chart with square axes?

    Thanks for this. I have found some code that allows me to square my charts BUT
    I would also like to be able to scale the grid squares on my chart - e.g.
    each Major Unit is 1 centimetre. This will require scaling of both height and
    width to maintain the square grid.
    All help appreciated - thanks
    Patrick

    "Ardus Petus" wrote:

    > Try this:
    >
    > '---------
    > Sub SquareChart()
    > With ActiveSheet.Shapes("Graphique 1")
    > .Height = .Width
    > End With
    > End Sub
    > '---------
    >
    > Regards,
    > --
    > AP
    >
    > "patrick" <[email protected]> a écrit dans le message de
    > news: [email protected]...
    > >I have generated a chart using Excel data but wish to ensure that the chart
    > > is square (i.e. the x and the y axes are to the same scale). an anyone
    > > help
    > > please?

    >
    >
    >


  4. #4
    Jon Peltier
    Guest

    Re: How do I get VBA to generate a chart with square axes?

    This will get you part of the way:

    http://peltiertech.com/Excel/Charts/SquareGrid.html

    - Jon
    -------
    Jon Peltier, Microsoft Excel MVP
    Peltier Technical Services
    Tutorials and Custom Solutions
    http://PeltierTech.com/
    _______

    "patrick" <[email protected]> wrote in message
    news:[email protected]...
    > Thanks for this. I have found some code that allows me to square my charts
    > BUT
    > I would also like to be able to scale the grid squares on my chart - e.g.
    > each Major Unit is 1 centimetre. This will require scaling of both height
    > and
    > width to maintain the square grid.
    > All help appreciated - thanks
    > Patrick
    >
    > "Ardus Petus" wrote:
    >
    >> Try this:
    >>
    >> '---------
    >> Sub SquareChart()
    >> With ActiveSheet.Shapes("Graphique 1")
    >> .Height = .Width
    >> End With
    >> End Sub
    >> '---------
    >>
    >> Regards,
    >> --
    >> AP
    >>
    >> "patrick" <[email protected]> a écrit dans le message de
    >> news: [email protected]...
    >> >I have generated a chart using Excel data but wish to ensure that the
    >> >chart
    >> > is square (i.e. the x and the y axes are to the same scale). an anyone
    >> > help
    >> > please?

    >>
    >>
    >>




+ 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