How to show current user name in a cell?
问题 In most of the online resource I can find usually show me how to retrieve this information in VBA. Is there any direct way to get this information in a cell? For example as simple as =ENVIRON('User') (which did not work) 回答1: Based on the instructions at the link below, do the following. In VBA insert a new module and paste in this code: Public Function UserName() UserName = Environ$("UserName") End Function Call the function using the formula: =Username() Based on instructions at: https:/