Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: Automatic Footer

  1. #1
    New Member
    Join Date
    Apr 2002
    Location
    NY, NY
    Posts
    31
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I'd like to create some code that would, upon saving a file, automatically add a centered footer containing FILE, TAB.

    Any ideas?

    Many thanks for this great service!

  2. #2
    Board Regular
    Join Date
    Apr 2002
    Posts
    197
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Try something like this in the before save sub of the workbook. I hope this helps.
    The &F stands for filename.

    Private Sub Workbook_BeforeSave()

    With ActiveSheet.PageSetup
    .CenterHeader = "&F"
    End With
    End Sub

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Location
    Massachusetts, USA
    Posts
    255
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Enter the following macro (or a variation on it)in ThisWorkbook:

    Private Sub Workbook_BeforeClose (Cancel as Boolean)
    For Each sht in AcitveWorkbook.Sheets
    sht.PageSetup.CenterFooter = ActiveWorkbook.FullName
    Next sht
    End Sub

  4. #4
    New Member
    Join Date
    Apr 2002
    Location
    NY, NY
    Posts
    31
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks for the help!

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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