Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Global Macro: How to Do It Best

Status
Not open for further replies.

Rougy

Programmer
Oct 15, 2001
249
US
Hi,

We want to incorporate this fairly handy macro and make it available to all users on our LAN. Any suggestions on how to go about it best? Thanks.

*****

Sub footer()
Dim vFileName As String
Dim vRevised As String
Dim vCreated As String

With ActiveWorkbook
vFileName = .FullName
vCreated = Format(.BuiltinDocumentProperties(11).Value, "mm/dd/yyyy")
End With

vRevised = Format(Now, "mm/dd/yyyy")

With ActiveSheet.PageSetup
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftFooter = "&7" & vFileName
.CenterFooter = "&10Page &P of &N" & Chr(10)
.RightFooter = "&7Revised Date: " & vRevised _
& Chr(10) _
& "Created: " & vCreated
End With

End Sub

-----
The death of dogma is the birth of reason.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top