开发者

VBA gives wrong plotarea width?

开发者 https://www.devze.com 2023-04-08 21:43 出处:网络
I want to get the PlotArea width and height in order to calculate t开发者_JAVA技巧he proportion.

I want to get the PlotArea width and height in order to calculate t开发者_JAVA技巧he proportion. I used ActiveChart.PlotArea.Width to get the width, and then tested the width using Photoshop.

I discovered that the width returned by ActiveChart.PlotArea.Width is wrong.

Image shows what I am talking about:

VBA gives wrong plotarea width?

I have no Idea why...

Please help me to understand why it happens and how to fix it...

Thanks!


PlotArea.Width is returning the width in points not pixels. http://msdn.microsoft.com/en-us/library/ff198324.aspx

Points are a unit of length. Pixels are variable on a number of factors like monitor, fonts, truefont settings, ect. Here is a SO post about converting pixels to points: Convert Pixels to Points

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号