by SCC (9 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 10th May 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Get Logon ID from Network. Brilliant for NT based Databases or Apps
API Declarations
Function GetUsername()
'Need Some Code? Request it at www.smokecrack.co.uk
Dim EnvString, MyName
EnvString = "?"
indx = 1
Do While Not EnvString = ""
EnvString = Environ(indx)
If Left$(EnvString, 8) = "USERNAME" Then GoTo yes
indx = indx + 1
Loop
MsgBox "COULD NOT FIND ENVIRONMENT STRING - FATAL ERROR!", 16, "FATAL ERROR"
yes:
GetUsername = Right$(EnvString, 7)
End Function
Text0.Value = GetUsername
if text0.value = is not null then MsgBox "Need Some Code? Request it at www.smokecrack.co.uk"
End Sub
No comments have been posted about Get Logon ID from Network. Brilliant for NT based Databases or Apps. Why not be the first to post a comment about Get Logon ID from Network. Brilliant for NT based Databases or Apps.