View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
PCLIVE PCLIVE is offline
external usenet poster
 
Posts: 168
Default Reference a User Name via macro

Tom,

Thank you. You have covered both areas, one of which I will definitely use.
After testing each method you've suggested, I will most likely use
environ("Username"). After testing this I'm assuming that this is pulling
from the "Computer Name" set in Device Manager.

Thanks again for your help.
Paul


"Tom Ogilvy" wrote in message
...
Range("A2").Value = environ("username")

or perhaps you are looking for application.Username which is what is
entered
in Tools=Options=General tab

--
Regards,
Tom Ogilvy


"PCLIVE" wrote in message
...
What code should I use to reference the current user that is saved within
Excel. When the macro is run, in A2 I would like it to display the user
that ran the macro

Range("A2").Value = current user name

Thanks,
Paul