Hi Joediga,
There are two ways of doing this that I know of.
First, use a built in method:
example:
Text3 = Environ("username"
This will work on NT, Win2000, and XP. I am not sure about Win98.
Or you could use a function like:
Example:
*****start sample*****
Function fOSUserName() As String
' Returns the network login name
Dim lngLen As Long, lngX As Long
Dim strUserName As String
strUserName = String$(254, 0)
lngLen = 255
lngX = apiGetUserName(strUserName, lngLen)
If lngX <> 0 Then
fOSUserName = Left$(strUserName, lngLen - 1)
Else
fOSUserName = ""
End If
End Function
******end sample********
Let me know if this does not answer what you need.
HTH
Have A Great Day!!!,
Nathan
Senior Test Lead