userdomain is an environ element... try this and you can see what items you can
get from the environ... (modified from the help example
Sub environstring()
Dim EnvString, Indx, Msg, PathLen ' Declare variables.
Indx = 1 ' Initialize index to 1.
Do
EnvString = Environ(Indx) ' Get environment
' variable.
If Left(EnvString, 5) = "PATH=" Then ' Check PATH entry.
PathLen = Len(Environ("PATH")) ' Get length.
ThisWorkbook.Worksheets("sheet2").Range("A" & Indx).Value = EnvString
' Msg = "PATH entry = " & Indx & " and length = " & PathLen
' Exit Do
Else
Indx = Indx + 1 ' Not PATH entry,
ThisWorkbook.Worksheets("sheet2").Range("A" & Indx).Value = EnvString
End If ' so increment.
Loop Until EnvString = ""
If PathLen > 0 Then
MsgBox Msg ' Display message.
Else
MsgBox "No PATH environment variable exists."
End If
End Sub