Forum Discussion
Chart sheet default paper size
- Jun 10, 2019
_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.
_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_Jun 10, 2019Copper 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 BarresseJun 10, 2019Iron 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.
- _jon_Jun 11, 2019Copper ContributorThanks Zack