ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Find Out Logged in User (https://www.excelbanter.com/excel-programming/338687-find-out-logged-user.html)

Nigel

Find Out Logged in User
 
Is it possible to find out who is logged into the computer, I want to use
this function to decide whether a piece of of code shoud run

ie

if username="bob" then
do this
end if

Thanks

Rob Bovey

Find Out Logged in User
 
"Nigel" wrote in message
...
Is it possible to find out who is logged into the computer, I want to use
this function to decide whether a piece of of code shoud run


The Environ("Username") function is one way to do it.

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm



Neil

Find Out Logged in User
 
Nigel,

Check out the Excel pages at www.nwarwick.co.uk.

You will find a ready made VBA routine to do exactly what you want.

HTH

Neil
www.nwarwick.co.uk

"Nigel" wrote:

Is it possible to find out who is logged into the computer, I want to use
this function to decide whether a piece of of code shoud run

ie

if username="bob" then
do this
end if

Thanks



All times are GMT +1. The time now is 09:32 PM.

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