RE: macro for footer
- From: Jim Thomlinson <James_Thomlinson@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 11 Jul 2008 08:28:01 -0700
This code should do what you need. Right click the XL icon in the upper left
hand corner of the XL window and select View code. This will take you to the
VBE. Paste the following...
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wks As Worksheet
For Each wks In ActiveWindow.SelectedSheets
With wks.PageSetup
.LeftFooter = ThisWorkbook.Path & "\" & ThisWorkbook.Name
.RightFooter = Date
End With
Next wks
End Sub
--
HTH...
Jim Thomlinson
"april" wrote:
on each excel document that i print, i would like to include the date, the.
file name, and the path. i saw a solution to this but the solution pertained
only to new documents. how do i set up a macro in an existing document that
automatically prints that info?
thanks for your help
--
aprilshowers
- Prev by Date: Re: Getting names data information from another sheet
- Next by Date: Re: How can I open up a Lotus 123 spreadsheet in Excel 2007?
- Previous by thread: Re: Splitting Date and Time
- Next by thread: Re: How can I open up a Lotus 123 spreadsheet in Excel 2007?
- Index(es):
Relevant Pages
|