How to show current user name in a cell?

前端 未结 6 670
太阳男子
太阳男子 2021-02-02 11:26

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

6条回答
  •  遇见更好的自我
    2021-02-02 11:57

    Example: to view the Windows User Name on Cell C5, you can use this script :

    Range("C5").Value = ": " & Environ("USERNAME").
    

提交回复
热议问题