![]() |
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? |
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? |
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? |
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