Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 82
Default Using footer to display a "document expiration date"

I have some controlled documents that occasionally need to be printed, some
of which are in excel, and need to have a date printed on them when the
printed document should be destroyed. Basically adding a footer that read:

"This document is invaid after 01/01/2006"

The date should be 30 days after the date the document is printed.

How is this done?

Thanks in advance,

Scott


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Using footer to display a "document expiration date"

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftFooter = "This document is invaid after " & Format(Date + 30,
"dd/mm/yyyy")
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 Phillips

(remove nothere from email address if mailing direct)

"Scott Wagner" wrote in message
...
I have some controlled documents that occasionally need to be printed,

some
of which are in excel, and need to have a date printed on them when the
printed document should be destroyed. Basically adding a footer that

read:

"This document is invaid after 01/01/2006"

The date should be 30 days after the date the document is printed.

How is this done?

Thanks in advance,

Scott




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 82
Default Using footer to display a "document expiration date"

Not working... following your directions. What could I be missing here?

Thanks for the quick response.



"Bob Phillips" wrote:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftFooter = "This document is invaid after " & Format(Date + 30,
"dd/mm/yyyy")
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 Phillips

(remove nothere from email address if mailing direct)

"Scott Wagner" wrote in message
...
I have some controlled documents that occasionally need to be printed,

some
of which are in excel, and need to have a date printed on them when the
printed document should be destroyed. Basically adding a footer that

read:

"This document is invaid after 01/01/2006"

The date should be 30 days after the date the document is printed.

How is this done?

Thanks in advance,

Scott





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using footer to display a "document expiration date"


Hi Scott,

Bob's code is working for me, Are you sure you put it in the "WorkBook"
Module,
and not a General or Sheet Module??

Dave
Scott Wagner Wrote:
Not working... following your directions. What could I be missing
here?

Thanks for the quick response.



"Bob Phillips" wrote:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftFooter = "This document is invaid after " & Format(Date

+ 30,
"dd/mm/yyyy")
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 Phillips

(remove nothere from email address if mailing direct)

"Scott Wagner" wrote in

message
...
I have some controlled documents that occasionally need to be

printed,
some
of which are in excel, and need to have a date printed on them when

the
printed document should be destroyed. Basically adding a footer

that
read:

"This document is invaid after 01/01/2006"

The date should be 30 days after the date the document is printed.

How is this done?

Thanks in advance,

Scott







--
Desert Piranha


------------------------------------------------------------------------
Desert Piranha's Profile: http://www.excelforum.com/member.php...o&userid=28934
View this thread: http://www.excelforum.com/showthread...hreadid=511720

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Using footer to display a "document expiration date"

Could it be NG wrap-around.

Maybe try

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftFooter = "This document is invaid after " & _
Format(Date + 30,"dd/mm/yyyy")
End With

End Sub


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Scott Wagner" wrote in message
...
Not working... following your directions. What could I be missing here?

Thanks for the quick response.



"Bob Phillips" wrote:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftFooter = "This document is invaid after " & Format(Date +

30,
"dd/mm/yyyy")
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 Phillips

(remove nothere from email address if mailing direct)

"Scott Wagner" wrote in message
...
I have some controlled documents that occasionally need to be printed,

some
of which are in excel, and need to have a date printed on them when

the
printed document should be destroyed. Basically adding a footer that

read:

"This document is invaid after 01/01/2006"

The date should be 30 days after the date the document is printed.

How is this done?

Thanks in advance,

Scott









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 82
Default Using footer to display a "document expiration date"

That worked.

Thanks so much!

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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
How do I change the column heading in Excel to display "A" "B" "C Thai New Users to Excel 1 November 30th 07 08:06 PM
Retrieving info from "child" to a "parent" document create button to unhide rows Excel Discussion (Misc queries) 0 January 21st 07 10:40 PM
Showing "Created by User, Date, Time" in Footer Mark Plaideau Excel Discussion (Misc queries) 0 April 9th 06 11:29 PM
Footer, "fixed" date John F[_2_] Excel Programming 5 October 26th 04 07:00 PM


All times are GMT +1. The time now is 04:59 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"