ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Date & Time Stamp for printing (https://www.excelbanter.com/excel-worksheet-functions/176648-date-time-stamp-printing.html)

Neon520

Date & Time Stamp for printing
 
I know that there is a "date and time stamp" in the Header and Footer section
but I'm running out of margin to do the Header and Footer.
How can I have a date and time stamp in the cell for printing purpose?
I've tried =now(), but the thing is now() update only when the sheet is
first open, and it won't update when I'm getting ready to print, and I don't
want to press F9 to "refresh" the formula every time I need to print.

Is there a way to work around the formula so it will update the time every
time I print, just like the way the Header and Footer work?

Thanks,



Gord Dibben

Date & Time Stamp for printing
 
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet
.Range("A1").Value = Format(Date, "mmmm dd, yyyy")
.PrintOut
End With
End Sub


Gord Dibben MS Excel MVP

On Wed, 13 Feb 2008 15:21:01 -0800, Neon520
wrote:

I know that there is a "date and time stamp" in the Header and Footer section
but I'm running out of margin to do the Header and Footer.
How can I have a date and time stamp in the cell for printing purpose?
I've tried =now(), but the thing is now() update only when the sheet is
first open, and it won't update when I'm getting ready to print, and I don't
want to press F9 to "refresh" the formula every time I need to print.

Is there a way to work around the formula so it will update the time every
time I print, just like the way the Header and Footer work?

Thanks,




All times are GMT +1. The time now is 05:55 AM.

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