Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
jim314
 
Posts: n/a
Default Modifying a footer date

First, just to clarify, I am NOT looking to print the date/time the file was
last modified, but rather I am looking to modify the default date format that
Excel displays on the footers. How can this be done?

Example:
Currently the date looks like this: 10/21/05
I would like the date to look like this: Friday, October 21, 2005

Thanks in advance,

Jim
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default Modifying a footer date

If you do use the print the date technique you can specify its format


Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftFooter = Format(Date, "dddd, mmmm dd, 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

RP
(remove nothere from the email address if mailing direct)


"jim314" wrote in message
...
First, just to clarify, I am NOT looking to print the date/time the file

was
last modified, but rather I am looking to modify the default date format

that
Excel displays on the footers. How can this be done?

Example:
Currently the date looks like this: 10/21/05
I would like the date to look like this: Friday, October 21, 2005

Thanks in advance,

Jim



  #3   Report Post  
Mary Sasiela
 
Posts: n/a
Default Modifying a footer date

Hello
I would like something similar. In the center footer (I've already modified
'Left" to "center' in the string), I need a line of text in the center footer
with the text "Last Printed 25-OCT-2005" (for example) on the second line of
the footer. So it would read in center footer:
Effective date - whatever text I type - not an updatable field
Last Printed &[Date]
(where the format must be dd-MMM-yyyy)

When I use Bob's string below, it's overwriting my first line of code.

My thx. in advance for your help.

Mary

"Bob Phillips" wrote:

If you do use the print the date technique you can specify its format


Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftFooter = Format(Date, "dddd, mmmm dd, 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

RP
(remove nothere from the email address if mailing direct)


"jim314" wrote in message
...
First, just to clarify, I am NOT looking to print the date/time the file

was
last modified, but rather I am looking to modify the default date format

that
Excel displays on the footers. How can this be done?

Example:
Currently the date looks like this: 10/21/05
I would like the date to look like this: Friday, October 21, 2005

Thanks in advance,

Jim




  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default Modifying a footer date

Mary,

Try this

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim sTemp As String
Dim iPos As Long
With ActiveSheet.PageSetup
sTemp = .LeftFooter
iPos = InStr(sTemp, "Last Printed:")
If iPos 0 Then
sTemp = Left(sTemp, iPos - 1)
End If
.LeftFooter = sTemp & vbNewLine & _
"Last Printed: " & Format(Date, "dd-mmm-yyyy")
End With
End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Mary Sasiela" wrote in message
...
Hello
I would like something similar. In the center footer (I've already

modified
'Left" to "center' in the string), I need a line of text in the center

footer
with the text "Last Printed 25-OCT-2005" (for example) on the second line

of
the footer. So it would read in center footer:
Effective date - whatever text I type - not an updatable field
Last Printed &[Date]
(where the format must be dd-MMM-yyyy)

When I use Bob's string below, it's overwriting my first line of code.

My thx. in advance for your help.

Mary

"Bob Phillips" wrote:

If you do use the print the date technique you can specify its format


Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftFooter = Format(Date, "dddd, mmmm dd, 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

RP
(remove nothere from the email address if mailing direct)


"jim314" wrote in message
...
First, just to clarify, I am NOT looking to print the date/time the

file
was
last modified, but rather I am looking to modify the default date

format
that
Excel displays on the footers. How can this be done?

Example:
Currently the date looks like this: 10/21/05
I would like the date to look like this: Friday, October 21, 2005

Thanks in advance,

Jim






  #5   Report Post  
Mary Sasiela
 
Posts: n/a
Default Modifying a footer date

Many thanks Bob. I'll try tonight & let you know. THX for your quick
response!

Mary

"Bob Phillips" wrote:

Mary,

Try this

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim sTemp As String
Dim iPos As Long
With ActiveSheet.PageSetup
sTemp = .LeftFooter
iPos = InStr(sTemp, "Last Printed:")
If iPos 0 Then
sTemp = Left(sTemp, iPos - 1)
End If
.LeftFooter = sTemp & vbNewLine & _
"Last Printed: " & Format(Date, "dd-mmm-yyyy")
End With
End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Mary Sasiela" wrote in message
...
Hello
I would like something similar. In the center footer (I've already

modified
'Left" to "center' in the string), I need a line of text in the center

footer
with the text "Last Printed 25-OCT-2005" (for example) on the second line

of
the footer. So it would read in center footer:
Effective date - whatever text I type - not an updatable field
Last Printed &[Date]
(where the format must be dd-MMM-yyyy)

When I use Bob's string below, it's overwriting my first line of code.

My thx. in advance for your help.

Mary

"Bob Phillips" wrote:

If you do use the print the date technique you can specify its format


Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftFooter = Format(Date, "dddd, mmmm dd, 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

RP
(remove nothere from the email address if mailing direct)


"jim314" wrote in message
...
First, just to clarify, I am NOT looking to print the date/time the

file
was
last modified, but rather I am looking to modify the default date

format
that
Excel displays on the footers. How can this be done?

Example:
Currently the date looks like this: 10/21/05
I would like the date to look like this: Friday, October 21, 2005

Thanks in advance,

Jim








  #6   Report Post  
Mary Sasiela
 
Posts: n/a
Default Modifying a footer date

Hi again

So ... I think I'm close. I modified the code to be CenterFooter - that's
fine.

But I'm getting an extra linefeed that I don't want. What I do want in the
centre footer is:

Effective Date - (a date manually entered by me - fot a field)
Last Printed: (then, last printed date)

There should only be one line feed after Effective date.

I cut out the "& vbNewLine" but it's still doing it.

Any advice?

Mary

"Bob Phillips" wrote:

Mary,

Try this

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim sTemp As String
Dim iPos As Long
With ActiveSheet.PageSetup
sTemp = .LeftFooter
iPos = InStr(sTemp, "Last Printed:")
If iPos 0 Then
sTemp = Left(sTemp, iPos - 1)
End If
.LeftFooter = sTemp & vbNewLine & _
"Last Printed: " & Format(Date, "dd-mmm-yyyy")
End With
End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Mary Sasiela" wrote in message
...
Hello
I would like something similar. In the center footer (I've already

modified
'Left" to "center' in the string), I need a line of text in the center

footer
with the text "Last Printed 25-OCT-2005" (for example) on the second line

of
the footer. So it would read in center footer:
Effective date - whatever text I type - not an updatable field
Last Printed &[Date]
(where the format must be dd-MMM-yyyy)

When I use Bob's string below, it's overwriting my first line of code.

My thx. in advance for your help.

Mary

"Bob Phillips" wrote:

If you do use the print the date technique you can specify its format


Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftFooter = Format(Date, "dddd, mmmm dd, 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

RP
(remove nothere from the email address if mailing direct)


"jim314" wrote in message
...
First, just to clarify, I am NOT looking to print the date/time the

file
was
last modified, but rather I am looking to modify the default date

format
that
Excel displays on the footers. How can this be done?

Example:
Currently the date looks like this: 10/21/05
I would like the date to look like this: Friday, October 21, 2005

Thanks in advance,

Jim






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
NETWORKDAYS - Multiple Date Selection Annabelle Excel Discussion (Misc queries) 3 October 4th 05 07:04 PM
search for latest date Sue Excel Worksheet Functions 2 August 2nd 05 11:09 PM
How do I enter the date last modified in the footer of an Excel d. Last modified date in footer Excel Discussion (Misc queries) 1 February 6th 05 11:12 PM
Print Footer with Last Print Date field name Ted Excel Discussion (Misc queries) 1 December 23rd 04 02:46 PM
Date in Footer Karen Excel Worksheet Functions 1 November 22nd 04 05:33 PM


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