Following code will work in any OS that has the Username in the environment variables (type SET at command prompt). I think NT/2k/Xp have it:
user=environ("username"
Alternately, the following should work in NT/9x/me/xp/2k:
Private Declare Function GetUserName Lib "advapi32.dll" Alias _
"GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Sub test()
user = UserName
MsgBox (user & " is currently logged into this machine."

End Sub
Public Property Get UserName() As String
Const ULEN As Long = 257
Dim s As String * ULEN, l As Long
GetUserName s, ULEN
l = InStr(1, s, Chr(0), vbBinaryCompare)
If l > 1 Then
UserName = Left$(s, l - 1)
End If
End Property