View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Paul Lautman Paul Lautman is offline
external usenet poster
 
Posts: 85
Default How to find Windows login name with code?

SupperDuck wrote:
Dear all,

In my macro i want to get the login name.

For example, when i make a record macro, it writes "this macro was
created by superduck which is my login name on windows.

But i don't know how to do this with code :(

Regards,


Well here's a strange thing. I just went to a search engine that you may
have heard of called Google and typed in:
vba windows login name
And the very top result returned was:
Function to return various Environment Names | Excelguru.ca The formula can
also be called in VBA in the same manner. For example:; msgbox
getname("windows") or msgbox getname(2) will return the Windows login name
....
excelguru.ca/node/2 - 32k - Cached - Similar pages


If you haven't heard of Google I suggest that you take a look, it tends to
be able to find lots of useful things like this in seconds.