Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Feb 2003
    Location
    Melbourne, Victoria, Australia
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Custom footer (Excel 2000 SR-1)

    Edited by HansV to put <!t>[pre]<!/t> and <!t>[/pre]<!/t> tags around example, to preserve spaces. See <!help=19>Help 19<!/help>

    I would like to create a custom footer in my book.xlt so that all new workbooks contain the footer.
    The footer should look like below with a line at the top and then Filename on the first line with Date created (Left footer, left Justified), Author(Center footer, Centred) and Page x of Y (Right footer, Right Justified) on the second line.
    <pre>--------------------------------------------------------------------------------------
    Filename
    Date Created Author Page x of y
    </pre>

    I have gleaned some code online which works, but I haven't been able to create a line feed or what to use for the date Created field.

    Also how can I disable the dialog box when I create a new workbook asking me to choose whether to enable or disable macros.

    Sub Workbook_Open()
    Dim ws As Worksheet
    Application.ScreenUpdating = False
    For Each ws In ActiveWorkbook.Worksheets
    Application.StatusBar = "Changing header/footer in " & ws.Name
    With ws.PageSetup
    .LeftFooter = "&8" & "Path : " & ActiveWorkbook.FullName
    .CenterFooter = "&8" & ActiveWorkbook.Author
    .RightFooter = "&8" & "Page &P of &N"
    End With
    Next ws
    Set ws = Nothing
    Application.StatusBar = False
    End Sub

    Regards
    Zinger

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Custom footer (Excel 2000 SR-1)

    Steve (<!profile=sdckapr>sdckapr<!/profile>) posted code to insert the create date of a workbook in the footer, see <post#=446470>post 446470</post: > (you will need to adapt it to your needs).

    You could set macro security to Low (in Tools | Macro | Security) to suppress all macro warnings, but I wouldn't recommend that. You can disable the warning for all installed templates and add-ins:
    - Select Tools | Macro | Security...
    - Activate the Trusted Sources tab.
    - Tick the check box "Trust all installed add-ins and templates".
    - Click OK.

    It is also possible to digitally sign an individual workbook - see Description of digital certificates. Once you have indicated that you trust a certificate, you won't get the macro warning any more for workbooks that have been signed with this certificate.

  3. #3
    2 Star Lounger
    Join Date
    Feb 2003
    Location
    Melbourne, Victoria, Australia
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom footer (Excel 2000 SR-1)

    Thank you Hans for the information, reformatting my post and referring me to another post for inserting the create date.
    Regards
    Zinger

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •