+ Reply to Thread
Results 1 to 3 of 3

Can I display the file properties of a workbook in a custom headi.

  1. #1
    Sings4Fun
    Guest

    Can I display the file properties of a workbook in a custom headi.

    I am sharing a workbook with another user where I work and we both make
    changes to it on a regular basis. I am wondering if there is a function that
    can display the name of the last person who saved it and the last date it was
    saved so that we don't have to go into the header and manually update this
    information each time we change something in the workbook.

    Thanks!

  2. #2
    Gord Dibben
    Guest

    Re: Can I display the file properties of a workbook in a custom headi.

    Sings

    User Defined Function, not built-in.

    Function DocProps(prop As String)
    Application.Volatile
    On Error GoTo err_value
    DocProps = ActiveWorkbook.BuiltinDocumentProperties _
    (prop)
    Exit Function
    err_value:
    DocProps = CVErr(xlErrValue)
    End Function

    In A1 enter =DOCPROPS("author")
    In B1 enter =DOCPROPS("last save time")

    Then run this macro

    Sub CellInFooter()
    With ActiveSheet
    .PageSetup.RightFooter = .Range("A1").Text & _
    " " & .Range("B1").Text
    End With
    End Sub


    Gord Dibben Excel MVP

    On Fri, 15 Apr 2005 13:17:01 -0700, Sings4Fun
    <[email protected]> wrote:

    >I am sharing a workbook with another user where I work and we both make
    >changes to it on a regular basis. I am wondering if there is a function that
    >can display the name of the last person who saved it and the last date it was
    >saved so that we don't have to go into the header and manually update this
    >information each time we change something in the workbook.
    >
    >Thanks!



  3. #3
    Gord Dibben
    Guest

    Re: Can I display the file properties of a workbook in a custom headi.

    A much shortened version without the cells being populated.

    Mis-read original question. So what else is new?<g>

    Sub footer()
    ActiveSheet.PageSetup.RightFooter = _
    ActiveWorkbook.BuiltinDocumentProperties("last author") _
    & " " & ActiveWorkbook.BuiltinDocumentProperties("last save time")
    End Sub


    Gord

    On Fri, 15 Apr 2005 16:32:10 -0700, Gord Dibben <gorddibbATshawDOTca> wrote:

    >Sings
    >
    >User Defined Function, not built-in.
    >
    >Function DocProps(prop As String)
    > Application.Volatile
    > On Error GoTo err_value
    > DocProps = ActiveWorkbook.BuiltinDocumentProperties _
    > (prop)
    > Exit Function
    >err_value:
    > DocProps = CVErr(xlErrValue)
    >End Function
    >
    >In A1 enter =DOCPROPS("author")
    >In B1 enter =DOCPROPS("last save time")
    >
    >Then run this macro
    >
    >Sub CellInFooter()
    > With ActiveSheet
    > .PageSetup.RightFooter = .Range("A1").Text & _
    > " " & .Range("B1").Text
    > End With
    >End Sub
    >
    >
    >Gord Dibben Excel MVP
    >
    >On Fri, 15 Apr 2005 13:17:01 -0700, Sings4Fun
    ><[email protected]> wrote:
    >
    >>I am sharing a workbook with another user where I work and we both make
    >>changes to it on a regular basis. I am wondering if there is a function that
    >>can display the name of the last person who saved it and the last date it was
    >>saved so that we don't have to go into the header and manually update this
    >>information each time we change something in the workbook.
    >>
    >>Thanks!



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1