ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Adjust Chart Size (https://www.excelbanter.com/excel-programming/428589-adjust-chart-size.html)

[email protected]

Adjust Chart Size
 
Hi, I would like to create multiple charts by VBA. However, the chart
size were difference in different resolution's computers. May I know
how to make all charts have Width=10cells x Height = 15cells under
different resolution's computers? Thanks.

Tim Williams[_2_]

Adjust Chart Size
 

You can set the chartobject's Width and Height to the Width and Height of a
10x15 range on the worksheet.
However, this assumes all users have the same cell "sizes"

'****************
dim rng as range
set rng=range(activesheet.cells(1,1), activesheet.cells(15,10))

with oChart
.width = rng.width
.height = rng.height
end with
'*****************

Adjust to suit.

Tim



wrote in message
...
Hi, I would like to create multiple charts by VBA. However, the chart
size were difference in different resolution's computers. May I know
how to make all charts have Width=10cells x Height = 15cells under
different resolution's computers? Thanks.





All times are GMT +1. The time now is 11:54 AM.

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