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