Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there a variable available for capturing the user name in the footer of a
document? Similar to "&[Date]" or "&[Time]" as already exists? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup .LeftFooter = Environ("Username") End With End Sub 'This is workbook event code. 'To input this code, right click on the Excel icon on the worksheet '(or next to the File menu if you maximise your workbooks), 'select View Code from the menu, and paste the code -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Allison" wrote in message ... Is there a variable available for capturing the user name in the footer of a document? Similar to "&[Date]" or "&[Time]" as already exists? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Nothing that I know of. The variables that you speak of are both vloatile
(determined at run time). Name is not determined at run time, so it is just hard coded in the header/footer. You could easily write some code to put the name in the footer Application.UserName 'The name from Tools -Option -General -User Name or Environ("UserName") 'The users windows Login Name If you need more help just let me know... -- HTH... Jim Thomlinson "Allison" wrote: Is there a variable available for capturing the user name in the footer of a document? Similar to "&[Date]" or "&[Time]" as already exists? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks both of you. I'd seen the VBA code before, but didn't want to go that
route. Looks like I'm out of luck. Thanks again. "Allison" wrote: Is there a variable available for capturing the user name in the footer of a document? Similar to "&[Date]" or "&[Time]" as already exists? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Adding User Name to footer | Excel Discussion (Misc queries) | |||
user name in footer | Excel Discussion (Misc queries) | |||
how to include a variable in the header and/or footer of a worksheet | Excel Discussion (Misc queries) | |||
User name in Footer | Excel Discussion (Misc queries) | |||
how can one put the name of the user at the footer of a sheet | Excel Programming |