Date format in Header

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In the header there is an icon that will automatically insert the current
date on the header. Is there a way to put the previous day as the date in
the header? I've tried different formulas but they don't work.
 
Hi

An easy way is a small macro in the ThisWorkbook module:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.LeftHeader = Format(Date - 1, "dddd mmm dd yyyy")
End Sub

HTH. best wishes Harald
 

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

Back
Top