excel footer

G

Guest

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
 
R

Ron de Bruin

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("Last Save Time"), _
"yyyy-mmm-dd hh:mm:ss")
Next wkSht
End Sub
 
G

Guest

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.
 

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