I created a user defined function in ms excel 2010 for fetching current logged in user thru environvariable "USERNAME".
However, on some machines running ms excel2010 on win7, this function does not update current user name.
I had packaged it in a protected worksheet and distributed to several users.
The udf code goes this way : Public Function UserName() UserName = Environ$("UserName") End Function
Then the function is called using the formula:
=Username()