ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I display the 'Date Modified' in an Excel worksheet header (https://www.excelbanter.com/excel-discussion-misc-queries/25847-how-do-i-display-date-modified-excel-worksheet-header.html)

DC Solah

How do I display the 'Date Modified' in an Excel worksheet header
 
I have a series of workbooks being shared on a business server and being
updated by a number of sources as new information becomes available. Because
the date of these updates is important, I would like the workbook to display
the Date Modified in the header of the document when printed.

The only way I know to see this date is via Excel's properties window (or in
the Details view in Windows).

Jason Morin

Place this macro in the ThisWorkbook module. The header of the active
worksheet will be the last saved (modified) date:

Private Sub Workbook_BeforePrint(Cancel As Boolean)

Dim LastDate As String
Dim wbProp As String

wbProp = "last save time"
LastDate = ActiveWorkbook.BuiltinDocumentProperties(wbProp)

ActiveSheet.PageSetup.CenterHeader = LastDate

End Sub

---
HTH
Jason
Atlanta, GA


"DC Solah" wrote:

I have a series of workbooks being shared on a business server and being
updated by a number of sources as new information becomes available. Because
the date of these updates is important, I would like the workbook to display
the Date Modified in the header of the document when printed.

The only way I know to see this date is via Excel's properties window (or in
the Details view in Windows).


plngarbage

How do I display the 'Date Modified' in an Excel worksheet hea
 
Will this macro show the last date modified of the worksheet in the workbook?
Is there a way to have each tab display the last modified date for that tab
only?

"Jason Morin" wrote:

Place this macro in the ThisWorkbook module. The header of the active
worksheet will be the last saved (modified) date:

Private Sub Workbook_BeforePrint(Cancel As Boolean)

Dim LastDate As String
Dim wbProp As String

wbProp = "last save time"
LastDate = ActiveWorkbook.BuiltinDocumentProperties(wbProp)

ActiveSheet.PageSetup.CenterHeader = LastDate

End Sub

---
HTH
Jason
Atlanta, GA


"DC Solah" wrote:

I have a series of workbooks being shared on a business server and being
updated by a number of sources as new information becomes available. Because
the date of these updates is important, I would like the workbook to display
the Date Modified in the header of the document when printed.

The only way I know to see this date is via Excel's properties window (or in
the Details view in Windows).


Joanne

How do I display the 'Date Modified' in an Excel worksheet hea
 
how do i know WHO is the last person who modified?


"Jason Morin" wrote:

Place this macro in the ThisWorkbook module. The header of the active
worksheet will be the last saved (modified) date:

Private Sub Workbook_BeforePrint(Cancel As Boolean)

Dim LastDate As String
Dim wbProp As String

wbProp = "last save time"
LastDate = ActiveWorkbook.BuiltinDocumentProperties(wbProp)

ActiveSheet.PageSetup.CenterHeader = LastDate

End Sub

---
HTH
Jason
Atlanta, GA


"DC Solah" wrote:

I have a series of workbooks being shared on a business server and being
updated by a number of sources as new information becomes available. Because
the date of these updates is important, I would like the workbook to display
the Date Modified in the header of the document when printed.

The only way I know to see this date is via Excel's properties window (or in
the Details view in Windows).



All times are GMT +1. The time now is 11:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com