user name in footer
How do I include the name of the user who last updated a file in the footer?
E.g. last updated by xx / ddmmmyyyy -- pen |
user name in footer
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 "Penelope" wrote: How do I include the name of the user who last updated a file in the footer? E.g. last updated by xx / ddmmmyyyy -- pen |
user name in footer
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? -- pen "Mike H" wrote: 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 "Penelope" wrote: How do I include the name of the user who last updated a file in the footer? E.g. last updated by xx / ddmmmyyyy -- pen |
user name in footer
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 "Penelope" wrote: 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? -- pen "Mike H" wrote: 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 "Penelope" wrote: How do I include the name of the user who last updated a file in the footer? E.g. last updated by xx / ddmmmyyyy -- pen |
All times are GMT +1. The time now is 06:01 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com