Forum Discussion
Chart sheet default paper size
Hi,
When I select data in an excel 365 worksheet and press F11 to chart it, the chart sheet creates using the 'Letter' paper size... I can manually change the chart sheet to use 'Legal' paper size, but I'd like it to create using 'Legal' by default.
Is there any way to change the default paper size for chart sheets?
Note that when I open a new workbook and click File > Print, the paper size is shown as Legal.
Thanks
_jon_ you'd have to add the solution to a file, then save it as a template, and open a Workbook from that template every time. It's probably something I'd create a macro for and store it in your Personal.xlsb file, then assign it to a Ribbon/QAT button.
4 Replies
- Zack BarresseIron Contributor
_jon_ hello there. There is no way to change this by default. IIRC this is tied to your regional [OS] settings. You can circumvent this with code.
- Press ALT+F11 to open the Visual Basic Editor (VBE)
- Alternatively you can click on the Developer tab (must be showing) and click 'Visual Basic'
- Show Project Explorer (CTRL+R)
- Expand your file/project
- Expand 'Microsoft Excel Objects'
- Double click on 'ThisWorkbook'
- Paste the below code
- Close code window
Private Sub Workbook_NewChart(ByVal Ch As Chart)
If Ch.Type = 3 And Ch.Parent.Name = ThisWorkbook.Name Then
Ch.PageSetup.PaperSize = xlPaperLegal
End If
End Sub- _jon_Copper Contributor
Zack Barressethanks for this solution - works well!
If I understand correctly, I need to create this macro in each new workbook I create, in order for it to be active in that workbook... Do you know any way I can make excel create new workbooks with this macro already present?
- Zack BarresseIron Contributor
_jon_ you'd have to add the solution to a file, then save it as a template, and open a Workbook from that template every time. It's probably something I'd create a macro for and store it in your Personal.xlsb file, then assign it to a Ribbon/QAT button.
- Press ALT+F11 to open the Visual Basic Editor (VBE)