ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I get VBA to generate a chart with square axes? (https://www.excelbanter.com/excel-programming/360457-how-do-i-get-vba-generate-chart-square-axes.html)

Patrick

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?

Ardus Petus

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" a écrit dans le message de
news: ...
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?




Patrick

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" a écrit dans le message de
news: ...
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?





Jon Peltier

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" wrote in message
...
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" a écrit dans le message de
news: ...
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?








All times are GMT +1. The time now is 07:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com