Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
I am using the following code to automate adding the filename and path to the
footer (thanks to J.E. McGimpsey for posting this!): Private Sub Workbook_BeforePrint(Cancel As Boolean) Dim wsSht As Worksheet For Each wsSht In ActiveWindow.SelectedSheets wsSht.PageSetup.LeftFooter = Me.FullName Next wsSht End Sub It works just fine except that it puts it in with the default size font. I would like it to have it in a smaller font, such as 8 or 7, but I cannot figure out how to modify the code to do this. When I record a macro of changing the font size in the footer, it shows it as "&8Filename & path". When I tried adding the &* in front of FullName, it gave me an error. Any suggestions would be appreciated. Lee |
#2
![]() |
|||
|
|||
![]()
Hi Lee,
Try this Private Sub Workbook_BeforePrint(Cancel As Boolean) Dim wsSht As Worksheet For Each wsSht In ActiveWindow.SelectedSheets wsSht.PageSetup.LeftFooter = "&""Arial,Bold""&8" & Me.FullName Next wsSht End Sub -- HTH RP (remove nothere from the email address if mailing direct) "FinChase" wrote in message ... I am using the following code to automate adding the filename and path to the footer (thanks to J.E. McGimpsey for posting this!): Private Sub Workbook_BeforePrint(Cancel As Boolean) Dim wsSht As Worksheet For Each wsSht In ActiveWindow.SelectedSheets wsSht.PageSetup.LeftFooter = Me.FullName Next wsSht End Sub It works just fine except that it puts it in with the default size font. I would like it to have it in a smaller font, such as 8 or 7, but I cannot figure out how to modify the code to do this. When I record a macro of changing the font size in the footer, it shows it as "&8Filename & path". When I tried adding the &* in front of FullName, it gave me an error. Any suggestions would be appreciated. Lee |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel puts a 1 at the end of my filename | Excel Discussion (Misc queries) | |||
Opening an Excel file | Excel Discussion (Misc queries) | |||
How do I enter the date last modified in the footer of an Excel d. | Excel Discussion (Misc queries) | |||
Excel aficionado wants to learn Access | Excel Discussion (Misc queries) | |||
Excel user desires to learn ABC of Access | Excel Discussion (Misc queries) |