Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Thanga
 
Posts: n/a
Default How to add a modified date in header(excel)?

I need to get in header the date when the excel document have last modified.
I tried using &[Date] this brings the current date when we open the doc.

Kindly suggest good way of doing this.
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Private Sub Workbook_BeforePrint(Cacel As Boolean)
With ActiveWorkbook
.ActiveSheet.PageSetup.LeftHeader = "Last saved on: " & _
Format(.BuiltinDocumentProperties("Last Save Time"), "dd mmm
yyyy")
End With
End Sub


goes in the ThisWorkbook code module.


Watch the wrap-around on the Format line


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Thanga" wrote in message
...
I need to get in header the date when the excel document have last

modified.
I tried using &[Date] this brings the current date when we open the doc.

Kindly suggest good way of doing this.



  #3   Report Post  
Thanga
 
Posts: n/a
Default

HI Bob,
Thanks for the reply.
But the function does't work it gives and error. Kindly check it and let me
know the updated function.

Once again thanks for ur effort.

Regards
Thanga

"Bob Phillips" wrote:

Private Sub Workbook_BeforePrint(Cacel As Boolean)
With ActiveWorkbook
.ActiveSheet.PageSetup.LeftHeader = "Last saved on: " & _
Format(.BuiltinDocumentProperties("Last Save Time"), "dd mmm
yyyy")
End With
End Sub


goes in the ThisWorkbook code module.


Watch the wrap-around on the Format line


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Thanga" wrote in message
...
I need to get in header the date when the excel document have last

modified.
I tried using &[Date] this brings the current date when we open the doc.

Kindly suggest good way of doing this.




  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

I did say to watch the wrap-around. The yyyy") should be on the same line as
the Format.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Thanga" wrote in message
...
HI Bob,
Thanks for the reply.
But the function does't work it gives and error. Kindly check it and let

me
know the updated function.

Once again thanks for ur effort.

Regards
Thanga

"Bob Phillips" wrote:

Private Sub Workbook_BeforePrint(Cacel As Boolean)
With ActiveWorkbook
.ActiveSheet.PageSetup.LeftHeader = "Last saved on: " & _
Format(.BuiltinDocumentProperties("Last Save Time"), "dd mmm
yyyy")
End With
End Sub


goes in the ThisWorkbook code module.


Watch the wrap-around on the Format line


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Thanga" wrote in message
...
I need to get in header the date when the excel document have last

modified.
I tried using &[Date] this brings the current date when we open the

doc.

Kindly suggest good way of doing this.






  #5   Report Post  
Thanga
 
Posts: n/a
Default

Thanks it works. It was because of the extra "

Regards
Thanga

"Thanga" wrote:

I need to get in header the date when the excel document have last modified.
I tried using &[Date] this brings the current date when we open the doc.

Kindly suggest good way of doing this.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date modified within Spreadsheet jandersen Excel Discussion (Misc queries) 19 August 20th 09 03:09 AM
insert the date the file was last modified Hoff Excel Discussion (Misc queries) 8 November 21st 05 01:31 PM
Sheet Modified date in a cell.. ? n666 Excel Worksheet Functions 0 February 16th 05 01:32 AM
How do I enter the date last modified in the footer of an Excel d. Last modified date in footer Excel Discussion (Misc queries) 1 February 6th 05 11:12 PM
Modified Date DME New Users to Excel 11 December 14th 04 07:15 PM


All times are GMT +1. The time now is 02:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"