printout with auto date

A

adib

Hi, how can i take printout with date on footer without using custom
footer everyday. is there any formula to update date everyday on my
print page.i used everyday to change date using custom footer.please
suggest me if anyone knows about it. Thanks
 
D

Dave Peterson

In xl2003 menus:
File|page setup|custom footer

Look for a calendar like icon and press that icon.

The selected segment (right, middle, left) header will get "&[Date]" added.

If you don't want to use the format for that date that this provides, you'll
need a workbook event macro.

This kind of code runs when you print or print preview:

Option Explicit
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wks As Worksheet
For Each wks In Me.Worksheets
wks.PageSetup.LeftFooter = Format(Date, "mmmm dd yyyy")
Next wks
End Sub


This code goes in the ThisWorkbook module.

If you're new to macros:

Debra Dalgleish has some notes how to implement macros here:
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)
 
Top