Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
此代码似乎不适用于 Windows 7/8?
Public Function UserName() UserName = Environ$("UserName") End Function
有这个黑客吗?
问候,
我用:
Username = CreateObject("WScript.Network").Username
这适用于我在 Windows7 上使用 Excel 2010。
Environ("username")