Function that gives Windows current user name?

P

Petu

I need to know current Windows user name and update it to Excel sheet by
function?
 
H

Harald Staff

Hi

This needs a little VBA. In Win NT / Win 2000 / Win XP it's simply

Function CurrentUser() As String
CurrentUser = Environ("username")
End Function

Win 9x requires some windows programming. Post back if that's needed.

HTH. Best wishes Harald
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top