User Name / Computer Name

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
 
T

Thomas Ramel

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]
 

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