User Name / Computer Name

  • Thread starter Thread starter David Hall
  • Start date Start date
D

David Hall

Hi

I would like to setup a macro within Excel that checks
who / which computer is using a particular Excel Doc.

I know of the Excel VBA command: Application.UserName
However this only seems to get the user name for the Excel
application.

Is there a command that gets the computer's "name" ?

I use Excel 2003, and I am trying to find a way of
limiting the use of a particular Excel Doc to certain
users. These users may find it is easy to change the Excel
user name, however they are unable to change their
computer's name.

Many thanks for your input and comments

David Hall
 
Grüezi David

David Hall schrieb am 28.05.2004
I would like to setup a macro within Excel that checks
who / which computer is using a particular Excel Doc.

I know of the Excel VBA command: Application.UserName
However this only seems to get the user name for the Excel
application.

Is there a command that gets the computer's "name" ?

Try the following:

Environ("Username")
Environ("Computername")


--
Regards

Thomas Ramel
- MVP for Microsoft-Excel -

[Win XP Pro SP-1 / xl2000 SP-3]
 
Back
Top