ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   excel footer (https://www.excelbanter.com/excel-worksheet-functions/129362-excel-footer.html)

JiminAZ

excel footer
 
I used a UDF to enter the last modified date into a section of the custom
footer. Works great.
I want to add a separate line of text to the section of the footer
containing the modified date. Like this:

Company Name
Last Modified: 2/5/2007

Ron de Bruin

excel footer
 
Look here

http://www.rondebruin.nl/print.htm#Saved

but use this then

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In ThisWorkbook.Worksheets
wkSht.PageSetup.RightFooter = "Company name" & Chr(10) & "&8Last Saved : " & _
Format(ThisWorkbook.BuiltinDocumentProperties("Las t Save Time"), _
"yyyy-mmm-dd hh:mm:ss")
Next wkSht
End Sub



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"JiminAZ" wrote in message ...
I used a UDF to enter the last modified date into a section of the custom
footer. Works great.
I want to add a separate line of text to the section of the footer
containing the modified date. Like this:

Company Name
Last Modified: 2/5/2007


JiminAZ

excel footer
 
Ron,

That's the trick. Thanks.

& Chr(10) worked better than

& vbNewLine which seemed to double space rather than single space as I wanted.

Appreciate the extremely quick response.

"Ron de Bruin" wrote:

Look here

http://www.rondebruin.nl/print.htm#Saved

but use this then

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In ThisWorkbook.Worksheets
wkSht.PageSetup.RightFooter = "Company name" & Chr(10) & "&8Last Saved : " & _
Format(ThisWorkbook.BuiltinDocumentProperties("Las t Save Time"), _
"yyyy-mmm-dd hh:mm:ss")
Next wkSht
End Sub



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"JiminAZ" wrote in message ...
I used a UDF to enter the last modified date into a section of the custom
footer. Works great.
I want to add a separate line of text to the section of the footer
containing the modified date. Like this:

Company Name
Last Modified: 2/5/2007




All times are GMT +1. The time now is 08:39 PM.

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