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
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.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.