Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Excel 2007: Add year to footer

Hello,

I need to add an autotext field (or whatever the correct term) is so I
can add the copyright year to the footer, so the copyright year can be
updated as needed.

How do I do this? I can easily add the date, but I only want a year field.

Thanks,

Pete
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Excel 2007: Add year to footer

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup

.LeftFooter = Year(Date)
End With
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Petemeister2k" wrote in message
...
Hello,

I need to add an autotext field (or whatever the correct term) is so I
can add the copyright year to the footer, so the copyright year can be
updated as needed.

How do I do this? I can easily add the date, but I only want a year
field.

Thanks,

Pete



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Excel 2007: Add year to footer

I don't have a File menu anymore with Excel 2007, and I'm not sure how to add
this code. Is there a non-code way to do this? I will need to share this
with other people who will maintain the files and want things as simple as
possible.

Regards,

Pete

"Bob Phillips" wrote:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup

.LeftFooter = Year(Date)
End With
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Petemeister2k" wrote in message
...
Hello,

I need to add an autotext field (or whatever the correct term) is so I
can add the copyright year to the footer, so the copyright year can be
updated as needed.

How do I do this? I can easily add the date, but I only want a year
field.

Thanks,

Pete




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can you put a standard footer on Excel 2007 spreadsheets? Hellmut Excel Discussion (Misc queries) 10 April 8th 08 12:18 AM
How to add a footer to an Excel 2007 worksheet elton99999 Excel Discussion (Misc queries) 4 January 23rd 08 12:19 AM
Excel 2007 :Standard Footer Excel_Oz Excel Worksheet Functions 1 October 16th 07 11:21 PM
is there a way to format the date in an excel footer eg just year Mark Excel Worksheet Functions 1 July 31st 07 03:52 PM
=YEAR(3/7/2007) in EXCEL, get the answer as 1900. Why? LadyCat Excel Worksheet Functions 8 March 7th 07 11:36 PM


All times are GMT +1. The time now is 03:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"