VBA Scale or Resize Chart for Printing Only

bs0d

Well-known Member
Joined
Dec 29, 2006
Messages
622
I'm curious if anyone has experimented with this before?

I'd like to print a chart, and force it to scale to match the printer page size for printing purposes only (not modify the chart as it appears in the sheet).

Rationale - The chart fits a design "as-is" in the workbook. But the chart doesn't fill the page when printing, even when specifying to "fit to page".

Thoughts?
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
I was thinking that one approach could be:
Code:
 set the standard size in a variable (x, y).
Then identify what the size will need to be for desired printing out put.
Create a "print" command button tied to a macro that will re-size the chart --> print straight to default printer --> return chart to original size.
This may not be an ideal approach. I'm not sure if you can bypass the print dialog; I think having a print dialog box could cause problems (for instance, if someone canceled the print, would it cancel the rest of the code execution?).

Still open to ideas here. Of course, the goal is something fast, efficient, and least amout
 
Upvote 0

Forum statistics

Threads
1,223,958
Messages
6,175,643
Members
452,663
Latest member
MEMEH

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