Environ("username")函数获得系统环境变量username
Sub test() MsgBox Environ("COMPUTERNAME")End Sub
Application.username