Public Function UserName() As String 'Определяем имя пользователя Windows Dim WshNetwork As Object Set WshNetwork = CreateObject("WScript.Network") UserName = WshNetwork.UserName Set WshNetwork = Nothing End Function