vba Chart.Export command produces graph with size dependent on screen viewing size

BobJordanB

New Member
Joined
Sep 9, 2010
Messages
8
In Excel Mac 2011

If you use the Chart.Export command to produce a PNG file, it produces a file of the expected size if screen viewing size is 100%.
If view is 75% then each dimension of the result file is 75% of the correct size
If view is 200% then the outer border of the picture is double the size, but only the top left 25% of the image has any content.

Interestingly, the Rt Click command 'Save Picture As' does not exhibit this 'feature'.

Screen Viewing size should have no impact on picture pixel dimensions whether it is called from vba or using a Rt Click.

Solution
.Keep viewing size to 100% - but this is a viewer controlled parameter.
.Rescale the viewing size before the command is executed and then restore.
.Run a script to invoke the command using applescript or the like.

Hope this helps others.

Bob J.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Forum statistics

Threads
1,215,978
Messages
6,128,057
Members
449,416
Latest member
SHIVANISHARMA1711

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top