ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   User Name / Computer Name (https://www.excelbanter.com/excel-programming/299766-user-name-computer-name.html)

David Hall[_2_]

User Name / Computer Name
 
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


Harald Staff

User Name / Computer Name
 
Hi David

See http://www.erlandsendata.no/english/index.php?t=envbaos on this

HTH. best wishes Harald


"David Hall" skrev i melding
...
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




Thomas Ramel

User Name / Computer Name
 
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]

David Hall[_3_]

User Name / Computer Name
 
Harald

Many thanks for this - brilliant
-----Original Message-----
Hi David

See http://www.erlandsendata.no/english/index.php?

t=envbaos on this

HTH. best wishes Harald


"David Hall" skrev i melding
...
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



.



All times are GMT +1. The time now is 10:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com