Date & Time Stamp for printing

N

Neon520

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,
 
G

Gord Dibben

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top