PEGAR NOME DO USUARIO
Queria pegar o nome do usuario logado
tanks
tanks
Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Public Function sUserID() As String
Dim sBuffer As String
Dim lSize As Long
sBuffer = Space$(255)
lSize = Len(sBuffer)
GetUserName sBuffer, lSize
If lSize 0 Then
sUserID = Left$(sBuffer, lSize - 1)
End If
End Function
Abraços,
Public Function sUserID() As String
Dim sBuffer As String
Dim lSize As Long
sBuffer = Space$(255)
lSize = Len(sBuffer)
GetUserName sBuffer, lSize
If lSize 0 Then
sUserID = Left$(sBuffer, lSize - 1)
End If
End Function
Abraços,
Tópico encerrado , respostas não são mais permitidas