#1   Report Post  
tjh
 
Posts: n/a
Default Footer

Hello,

Is it possible to place in the footer of a spreadsheet the date that the
report was last modified, rather than the date the report is printed or the
current date.

Thanks,
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default Footer

One way:

Put something like this in the ThisWorkbook code module:

Private Sub Workbook_SheetChange( _
ByVal Sh As Object, ByVal Target As Excel.Range)
Sh.PageSetup.LeftFooter = Format(Date, "dd mmm yyyy")
End Sub

Note that this will only indicate when a cell is changed due to user
input (or external data link).

Also, if there are links between multiple worksheets, you'd need to
update each worksheet, not just the worksheet that was changed.

If you're not familiar with macros, take a look he

http://www.mvps.org/dmcritchie/excel/getstarted.htm


In article ,
tjh wrote:

Hello,

Is it possible to place in the footer of a spreadsheet the date that the
report was last modified, rather than the date the report is printed or the
current date.

Thanks,

  #3   Report Post  
tjh
 
Posts: n/a
Default Footer

Thanks for your respons,

I changed the code slightly to include the hour and minute, but it did not
seem to work correctly. It shows 12:00 AM as the current time.

Private Sub Workbook_SheetChange( _
ByVal Sh As Object, ByVal Target As Excel.Range)
Sh.PageSetup.RightFooter = Format(Date, "dd mmm yyyy" & " " & "hh:mm
AMPM")
End Sub


Thank You,




"JE McGimpsey" wrote:

One way:

Put something like this in the ThisWorkbook code module:

Private Sub Workbook_SheetChange( _
ByVal Sh As Object, ByVal Target As Excel.Range)
Sh.PageSetup.LeftFooter = Format(Date, "dd mmm yyyy")
End Sub

Note that this will only indicate when a cell is changed due to user
input (or external data link).

Also, if there are links between multiple worksheets, you'd need to
update each worksheet, not just the worksheet that was changed.

If you're not familiar with macros, take a look he

http://www.mvps.org/dmcritchie/excel/getstarted.htm


In article ,
tjh wrote:

Hello,

Is it possible to place in the footer of a spreadsheet the date that the
report was last modified, rather than the date the report is printed or the
current date.

Thanks,


  #4   Report Post  
tjh
 
Posts: n/a
Default Footer

And in addition to the below, how can I change the format. Such as times new
roman and 8 font (within this code)
Thank You,

"tjh" wrote:

Thanks for your respons,

I changed the code slightly to include the hour and minute, but it did not
seem to work correctly. It shows 12:00 AM as the current time.

Private Sub Workbook_SheetChange( _
ByVal Sh As Object, ByVal Target As Excel.Range)
Sh.PageSetup.RightFooter = Format(Date, "dd mmm yyyy" & " " & "hh:mm
AMPM")
End Sub


Thank You,




"JE McGimpsey" wrote:

One way:

Put something like this in the ThisWorkbook code module:

Private Sub Workbook_SheetChange( _
ByVal Sh As Object, ByVal Target As Excel.Range)
Sh.PageSetup.LeftFooter = Format(Date, "dd mmm yyyy")
End Sub

Note that this will only indicate when a cell is changed due to user
input (or external data link).

Also, if there are links between multiple worksheets, you'd need to
update each worksheet, not just the worksheet that was changed.

If you're not familiar with macros, take a look he

http://www.mvps.org/dmcritchie/excel/getstarted.htm


In article ,
tjh wrote:

Hello,

Is it possible to place in the footer of a spreadsheet the date that the
report was last modified, rather than the date the report is printed or the
current date.

Thanks,


  #5   Report Post  
Dave Peterson
 
Posts: n/a
Default Footer

Change this line:

Sh.PageSetup.RightFooter = Format(Date, "dd mmm yyyy" & " " & "hh:mm AMPM")
to
Sh.PageSetup.RightFooter = Format(Now, "dd mmm yyyy" & " " & "hh:mm AMPM")

And if you record a macro when you change the formatting of a footer, you'll see
something like:

With ActiveSheet.PageSetup
.RightFooter = "&""Times New Roman,Bold""&8asdfasdf"

So you might want something like:

Sh.PageSetup.RightFooter = "&""Times New Roman,Bold""&8" & _
Format(Now, "dd mmm yyyy" & " " & "hh:mm AMPM")


But you'll have to worry about that the first character of your string is
numeric. It could confuse excel into making that font size humongous.

Just add an extra space:

Sh.PageSetup.RightFooter = "&""Times New Roman,Bold""&8 " & _
Format(Now, "dd mmm yyyy" & " " & "hh:mm AMPM")


(there's a space right after the 8.)




tjh wrote:

And in addition to the below, how can I change the format. Such as times new
roman and 8 font (within this code)
Thank You,

"tjh" wrote:

Thanks for your respons,

I changed the code slightly to include the hour and minute, but it did not
seem to work correctly. It shows 12:00 AM as the current time.

Private Sub Workbook_SheetChange( _
ByVal Sh As Object, ByVal Target As Excel.Range)
Sh.PageSetup.RightFooter = Format(Date, "dd mmm yyyy" & " " & "hh:mm
AMPM")
End Sub


Thank You,




"JE McGimpsey" wrote:

One way:

Put something like this in the ThisWorkbook code module:

Private Sub Workbook_SheetChange( _
ByVal Sh As Object, ByVal Target As Excel.Range)
Sh.PageSetup.LeftFooter = Format(Date, "dd mmm yyyy")
End Sub

Note that this will only indicate when a cell is changed due to user
input (or external data link).

Also, if there are links between multiple worksheets, you'd need to
update each worksheet, not just the worksheet that was changed.

If you're not familiar with macros, take a look he

http://www.mvps.org/dmcritchie/excel/getstarted.htm


In article ,
tjh wrote:

Hello,

Is it possible to place in the footer of a spreadsheet the date that the
report was last modified, rather than the date the report is printed or the
current date.

Thanks,


--

Dave Peterson


  #6   Report Post  
tjh
 
Posts: n/a
Default Footer

Thanks that helps.

One more, back to JE's comment on linked worksheets. If linked worksheets
(within the file) are updated, how can the date on these sheets be updated to
show that they were modified also. (without having to touch/change each sheet)


Thank You,


"Dave Peterson" wrote:

Change this line:

Sh.PageSetup.RightFooter = Format(Date, "dd mmm yyyy" & " " & "hh:mm AMPM")
to
Sh.PageSetup.RightFooter = Format(Now, "dd mmm yyyy" & " " & "hh:mm AMPM")

And if you record a macro when you change the formatting of a footer, you'll see
something like:

With ActiveSheet.PageSetup
.RightFooter = "&""Times New Roman,Bold""&8asdfasdf"

So you might want something like:

Sh.PageSetup.RightFooter = "&""Times New Roman,Bold""&8" & _
Format(Now, "dd mmm yyyy" & " " & "hh:mm AMPM")


But you'll have to worry about that the first character of your string is
numeric. It could confuse excel into making that font size humongous.

Just add an extra space:

Sh.PageSetup.RightFooter = "&""Times New Roman,Bold""&8 " & _
Format(Now, "dd mmm yyyy" & " " & "hh:mm AMPM")


(there's a space right after the 8.)




tjh wrote:

And in addition to the below, how can I change the format. Such as times new
roman and 8 font (within this code)
Thank You,

"tjh" wrote:

Thanks for your respons,

I changed the code slightly to include the hour and minute, but it did not
seem to work correctly. It shows 12:00 AM as the current time.

Private Sub Workbook_SheetChange( _
ByVal Sh As Object, ByVal Target As Excel.Range)
Sh.PageSetup.RightFooter = Format(Date, "dd mmm yyyy" & " " & "hh:mm
AMPM")
End Sub


Thank You,




"JE McGimpsey" wrote:

One way:

Put something like this in the ThisWorkbook code module:

Private Sub Workbook_SheetChange( _
ByVal Sh As Object, ByVal Target As Excel.Range)
Sh.PageSetup.LeftFooter = Format(Date, "dd mmm yyyy")
End Sub

Note that this will only indicate when a cell is changed due to user
input (or external data link).

Also, if there are links between multiple worksheets, you'd need to
update each worksheet, not just the worksheet that was changed.

If you're not familiar with macros, take a look he

http://www.mvps.org/dmcritchie/excel/getstarted.htm


In article ,
tjh wrote:

Hello,

Is it possible to place in the footer of a spreadsheet the date that the
report was last modified, rather than the date the report is printed or the
current date.

Thanks,


--

Dave Peterson

  #7   Report Post  
Dave Peterson
 
Posts: n/a
Default Footer

J.E.'s code looked for changes that you made by typing--and excel knows what
cell you changed (and what worksheet that cell was on).

Changes caused by calculation aren't as nice. Excel doesn't keep track of the
cells that changed--or the values before the recalculation.

I think the closest thing you could do is to keep track of each value in each
cell in each worksheet. Then you could compare those "before" values with the
"after recalc" values.

It doesn't sound like much fun to me.

tjh wrote:

Thanks that helps.

One more, back to JE's comment on linked worksheets. If linked worksheets
(within the file) are updated, how can the date on these sheets be updated to
show that they were modified also. (without having to touch/change each sheet)

Thank You,

"Dave Peterson" wrote:

Change this line:

Sh.PageSetup.RightFooter = Format(Date, "dd mmm yyyy" & " " & "hh:mm AMPM")
to
Sh.PageSetup.RightFooter = Format(Now, "dd mmm yyyy" & " " & "hh:mm AMPM")

And if you record a macro when you change the formatting of a footer, you'll see
something like:

With ActiveSheet.PageSetup
.RightFooter = "&""Times New Roman,Bold""&8asdfasdf"

So you might want something like:

Sh.PageSetup.RightFooter = "&""Times New Roman,Bold""&8" & _
Format(Now, "dd mmm yyyy" & " " & "hh:mm AMPM")


But you'll have to worry about that the first character of your string is
numeric. It could confuse excel into making that font size humongous.

Just add an extra space:

Sh.PageSetup.RightFooter = "&""Times New Roman,Bold""&8 " & _
Format(Now, "dd mmm yyyy" & " " & "hh:mm AMPM")


(there's a space right after the 8.)




tjh wrote:

And in addition to the below, how can I change the format. Such as times new
roman and 8 font (within this code)
Thank You,

"tjh" wrote:

Thanks for your respons,

I changed the code slightly to include the hour and minute, but it did not
seem to work correctly. It shows 12:00 AM as the current time.

Private Sub Workbook_SheetChange( _
ByVal Sh As Object, ByVal Target As Excel.Range)
Sh.PageSetup.RightFooter = Format(Date, "dd mmm yyyy" & " " & "hh:mm
AMPM")
End Sub


Thank You,




"JE McGimpsey" wrote:

One way:

Put something like this in the ThisWorkbook code module:

Private Sub Workbook_SheetChange( _
ByVal Sh As Object, ByVal Target As Excel.Range)
Sh.PageSetup.LeftFooter = Format(Date, "dd mmm yyyy")
End Sub

Note that this will only indicate when a cell is changed due to user
input (or external data link).

Also, if there are links between multiple worksheets, you'd need to
update each worksheet, not just the worksheet that was changed.

If you're not familiar with macros, take a look he

http://www.mvps.org/dmcritchie/excel/getstarted.htm


In article ,
tjh wrote:

Hello,

Is it possible to place in the footer of a spreadsheet the date that the
report was last modified, rather than the date the report is printed or the
current date.

Thanks,


--

Dave Peterson


--

Dave Peterson
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
Footer Macro? mully Excel Discussion (Misc queries) 0 September 10th 05 10:37 AM
How to insert a picture in the Footer (not the Header) in Excel 20 jmon Excel Worksheet Functions 2 March 17th 05 05:59 AM
Inserting Footer - Ajit Ajit Munj Excel Discussion (Misc queries) 2 March 11th 05 02:39 PM
How to automate custom footer on all tabs neal august Excel Discussion (Misc queries) 1 March 3rd 05 02:38 PM
Formatting a footer with a top border-line Ed Isenberg Excel Discussion (Misc queries) 3 December 19th 04 10:41 PM


All times are GMT +1. The time now is 09:35 AM.

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"