#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Changing username

Hello,
I'd like to change the excel´s username (Tools/Options/Username) with the
username of the windows (Documents Settings) just after opening the worksheet.

Someone could help me with this vba code?

Best regards
Mauricio BR
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 772
Default Changing username

If i understand you correctly, that you want to change the workbook username
to the name stored in the system for the current user, use this in the
worksheet open event.

Private Sub Workbook_Open()
Application.UserName = Environ("UserName")
End Sub
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"MauricioBR" wrote:

Hello,
I'd like to change the excel´s username (Tools/Options/Username) with the
username of the windows (Documents Settings) just after opening the worksheet.

Someone could help me with this vba code?

Best regards
Mauricio BR

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Changing username

That worked!
Thanks

"John Bundy" escreveu:

If i understand you correctly, that you want to change the workbook username
to the name stored in the system for the current user, use this in the
worksheet open event.

Private Sub Workbook_Open()
Application.UserName = Environ("UserName")
End Sub
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"MauricioBR" wrote:

Hello,
I'd like to change the excel´s username (Tools/Options/Username) with the
username of the windows (Documents Settings) just after opening the worksheet.

Someone could help me with this vba code?

Best regards
Mauricio BR

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
Application.UserName Question HROBERTSON Excel Discussion (Misc queries) 5 January 8th 07 05:01 PM
Show username in a cell bradasley Excel Discussion (Misc queries) 4 June 5th 06 03:34 PM
Show Username Param Excel Discussion (Misc queries) 1 March 11th 06 03:09 PM
Username Log PaulJ Excel Discussion (Misc queries) 8 March 1st 06 11:51 AM
NT Username ceemo Excel Discussion (Misc queries) 4 August 2nd 05 04:39 PM


All times are GMT +1. The time now is 11:20 PM.

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"