Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Footer variable for user name?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Footer variable for user name?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default Footer variable for user name?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Footer variable for user name?

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding User Name to footer TinaL Excel Discussion (Misc queries) 0 December 1st 09 03:07 PM
user name in footer Penelope Excel Discussion (Misc queries) 3 November 26th 07 12:21 PM
how to include a variable in the header and/or footer of a worksheet tmacke Excel Discussion (Misc queries) 2 April 14th 06 10:13 PM
User name in Footer Brian Allen - McKEOWN INC. Excel Discussion (Misc queries) 8 March 30th 05 09:57 PM
how can one put the name of the user at the footer of a sheet Omar Excel Programming 2 February 27th 05 09:15 AM


All times are GMT +1. The time now is 02:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"