View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
John Bundy John Bundy is offline
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