user name in footer

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
 
M

Mike H

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
 
P

Penelope

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?
 
M

Mike H

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
 
Top