LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 331
Default Automatic update of footer macro

I'm posting this for a user who sent me the following query, which I've
inserted below as submitted to me:

"Hi ,

Don't know if you know any VBA but I have a problem that I haven't been able
to resolve. I don't know any VBA but I can usually cheat by looking
something up via google or recording a macro and transferring and altering
parts of the code to do what I need it to do. But I haven't been able to
figure this one out:

I have a footer macro that I set up to include the "last author" and "last
modified" items rather than the current date/time and the original author.
The problem with my footer is that it doesn't update these items
automatically when I save. It will only update if I re-run the macro to
insert the footer. (This is the same problem as with using the regular
pathname footer in Excel - which doesn't update when you use save as and save
a file with the pathname in the footer to a new location.)

Sub Footer()
'
' Footer Macro
' Macro recorded 3/26/2007 by atao
'

ActiveSheet.PageSetup.LeftFooter = "&8Last Modified by " & ActiveWorkbook. _
BuiltinDocumentProperties("last author").Value & " " &
ActiveWorkbook. _
BuiltinDocumentProperties("last save time") & Chr(10) & "&Z&F\&A"

ActiveSheet.PageSetup.RightFooter = "&8&P of &N"

End Sub


So, I am either trying to find a way for those items to auto-update as does
current date and time (when you use &[date] &[time] (which I have a feeling
can't be done for Builtin Document Properties or have the macro re-run
automatically upon saving. I found something called "OnAction" property that
may do the trick when save is pressed but I actually don't know any VBA so I
thought maybe you would be able to help me?"
 
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
Automatic update of spreadsheet & automatic update between workboo Losva Excel Worksheet Functions 6 September 12th 08 03:22 PM
Macro automatic update miteeka Excel Discussion (Misc queries) 2 April 24th 07 04:32 PM
automatic footer Mike H. Excel Discussion (Misc queries) 2 October 31st 06 08:12 PM
automatic footer daidipya Excel Discussion (Misc queries) 3 May 31st 06 09:05 AM
automatic macro update boconnell Excel Worksheet Functions 4 February 9th 05 07:10 PM


All times are GMT +1. The time now is 12:20 AM.

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

About Us

"It's about Microsoft Excel"