default margins

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
On 2002-03-20 04:53, archana ahuja wrote:
how do i set default margins for all my excel files / worksheets.

Does this help you?

With ActiveSheet.PageSetup

.LeftMargin = Application.InchesToPoints(0.78740157480315)
.RightMargin = Application.InchesToPoints(0.78740157480315)
.TopMargin = Application.InchesToPoints(0.984251968503937)
.BottomMargin = Application.InchesToPoints(0.984251968503937)
.HeaderMargin = Application.InchesToPoints(0.511811023622047)
.FooterMargin = Application.InchesToPoints(0.511811023622047)

End With
 
Upvote 0
You can also set the desired margins in an empty workbook and save it as a template with the name Book.xlt or Sheet.xlt in the XLStart folder in your Microsoft Excel program folder. Microsoft Excel uses these templates to create new default workbooks or to insert new worksheets when you click Worksheet on the Insert menu.

Marc
 
Upvote 0
Thanks this was really easy. I saved all kinds of print settings. It was bugging me how to avoid setting the print settings all the time. The only part I couldn't get to work was saving the workbook in the XLStart folder. I have one of those folders, but it's in the Office folder, I don't have a separate Excel folder. I looked it up on the help menu and it gave the exact instructions you gave. I'm not sure why my folders aren't consistent. What I ended up doing was creating a shortcut on my desktop to the BOOK.XLT, so now I'll always use that shortcut rather than the Excel shortcut. It works and is just as easy.
 
Upvote 0

Forum statistics

Threads
1,215,044
Messages
6,122,827
Members
449,096
Latest member
Erald

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