View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
isabelle isabelle is offline
external usenet poster
 
Posts: 587
Default Determine a computer's fingerprint?

hi,

from Erlandsen Data Consulting,

Public Declare Function GetUserName Lib "advapi32.dll" Alias
"GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Public user As String

Private Sub info()
'Range("A1") = ReturnDommainUserName & ReturnUserName
user = ReturnDommainUserName & ReturnUserName
End Sub 'thank you Erlandsen Data Consulting

Function ReturnDommainUserName() As String
' returns the NT Domain User Name
Dim rString As String * 255, sLen As Long, tString As String
tString = ""
On Error Resume Next
sLen = GetUserName(rString, 255)
sLen = InStr(1, rString, Chr(0))
If sLen 0 Then
tString = Left(rString, sLen - 1)
Else
tString = rString
End If
On Error GoTo 0
ReturnDommainUserName = UCase(Trim(tString))
End Function 'merci à Erlandsen Data Consulting

Function ReturnUserName() As String
ReturnUserName = Application.UserName
End Function

isabelle

Le 2013-08-15 21:52, a écrit :
I am looking for any unique means of determining a computer's identification so that when a computer opens a particular Excel file


I have, its ID will be logged. Whether by mother board, processor, or
something else,

I am not particular, as long as the user can be identified and its
identification posted in Sheet1 and A1. I hope that clarifies. Thanks.