user name in footer

  • Thread starter Thread starter Penelope
  • Start date Start date
P

Penelope

How do I include the name of the user who last updated a file in the footer?

E.g. last updated by xx / ddmmmyyyy
 
Hi,

Maybe something along the lines of:-

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim Sht As Worksheet
For Each Sht In ThisWorkbook.Worksheets
Sht.PageSetup.RightFooter = Environ("Username")
Next Sht
End Sub

Mike
 
Thanks for your response... Can you tell me how/where to enter the lines...
I'm using Excel2003.... isn't there a drop-down menu or icon?
 
Penelope,

ALT+F11 to open VB editor. Double click 'This Workbook'
On the right hand side panel select 'Workbook' from the left dropdown and
'Before Print' and paste it in there.

Mike
 
Back
Top