Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing Default Margins in Excel 1

Status
Not open for further replies.

wesmk

Technical User
Aug 17, 2004
15
US
Wanting to change the default margins in various versions of Excel. Does anyone have any suggestions or do you just have to change the default each time? Thanks for any help

Wesmk
 
If nothing else, use this macro (adjust margins accordingly) in Personal.xls file, then assign it to a button and put it on a toolbar.

Code:
Sub Margins()
    With ActiveSheet.PageSetup
        .LeftMargin = Application.InchesToPoints(0.5)
        .RightMargin = Application.InchesToPoints(0.5)
        .TopMargin = Application.InchesToPoints(0.5)
        .BottomMargin = Application.InchesToPoints(0.5)
        .HeaderMargin = Application.InchesToPoints(0.25)
        .FooterMargin = Application.InchesToPoints(0.25)
    End With
End Sub

Software: XL2002 on Win2K
Humanware: Older than dirt
 
Kinda new at this, could you maybe help me step by step on creating this macro?
 
To set Up Excel’s default workbooks and worksheets, create a workbook with all the settings you like. Save it as:
1. an Excel template named Book.xlt, and also
2. as a template named Sheet.xlt.
Store both in your XLSTART folder, typically:
C:\Documents and Settings\<username>\Application Data\Microsoft\Excel\XLSTART
but check also under Tools|Options|General.
Note: Application Data is a hidden folder, so you must display hidden files and folders in order to see it.

Book.xlt will be used as the standard new workbook.
Sheet.xlt will be used as the standard new worksheet (Insert |Worksheet).

You would normally save Sheet.xlt as a workbook that contains just one worksheet. Otherwise, inserting a worksheet will result in multiple sheets being added.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top