I am running on Win NT 4.0 (I think), and using Excel 97.
I am trying to automatically insert the date a workbook was last changed into the footer of the worksheet. All I can get it to do is display the current date. Any ideas?
I am running on Win NT 4.0 (I think), and using Excel 97.
I am trying to automatically insert the date a workbook was last changed into the footer of the worksheet. All I can get it to do is display the current date. Any ideas?
Can you explain how are you doing that??
If you go to View->header / footer -> header / footer -> Custom Header,
it should allow to insert &[date] in there :o
Did you do something else???
That's what I did. But I need it to be the date the file was last saved, not the current date.
I think this is what you want
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim FilePath As String, PrintDate As String
FilePath = ThisWorkbook.Path & "\" & ThisWorkbook.Name
PrintDate = FileDateTime(FilePath)
ActiveSheet.PageSetup.CenterFooter = "File Last modified " & PrintDate
End Sub
Will put the file last modified date in centre footer of whatever sheet you print.
(Im hope VBA is OK)
Thank you both, works like a charm.. That is exactly what I was trying to do.:bouncing:
Don’t have an account yet? Register yourself now and be a part of our community!