Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 76
Default logon name in footer

I found this code for putting the user name found in Tools, options into the
footer

Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.RightFooter = Application.UserName
End Sub

How could this be changed to show the logon name. I tried changing
Application to Environ but that didn't work.

Thanks for your help!!
--
maryj
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default logon name in footer

Try

ActiveSheet.PageSetup.RightFooter = Environ("username")


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"maryj" wrote in message
...
I found this code for putting the user name found in Tools,
options into the
footer

Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.RightFooter = Application.UserName
End Sub

How could this be changed to show the logon name. I tried
changing
Application to Environ but that didn't work.

Thanks for your help!!
--
maryj



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 76
Default logon name in footer

Perfect!!
--
maryj


"Chip Pearson" wrote:

Try

ActiveSheet.PageSetup.RightFooter = Environ("username")


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"maryj" wrote in message
...
I found this code for putting the user name found in Tools,
options into the
footer

Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.RightFooter = Application.UserName
End Sub

How could this be changed to show the logon name. I tried
changing
Application to Environ but that didn't work.

Thanks for your help!!
--
maryj




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
Logon Elindeo New Users to Excel 1 October 28th 07 12:44 PM
logon rww Excel Discussion (Misc queries) 0 November 18th 06 04:42 AM
Logon Screen mamun316 Excel Worksheet Functions 1 November 7th 05 07:27 PM
Win XP Logon Name Andy Ives[_2_] Excel Programming 3 September 30th 05 11:14 AM
Logon information fl Excel Programming 1 June 21st 04 10:52 PM


All times are GMT +1. The time now is 11:52 AM.

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

About Us

"It's about Microsoft Excel"