View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
peter peter is offline
external usenet poster
 
Posts: 29
Default Very serious question !!!

Hi,
First... the other responses were much better( and simpler). You should
understand that the result from their functions will get you the user name
from the windows signin not novell. This should be the same as the novell
signin but no guarantee.

peter

"And1" wrote:

how I have use this code ??

peter napisaƂ(a):
Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" _
(ByVal lpBuffer As
String, _
nSize As Long) As Long

Sub startuf()
Dim lpBuff As String * 25
Dim ret As Long ', UserName As String
ret = GetUserName(lpBuff, 25)
username = Left(lpBuff, InStr(lpBuff, Chr(0)) - 1)

See if this helps.

peter


"And1" wrote:


I work in system Novell.
Can I obtain information:
- who is log on computer (user name)
- the name of computer
or something which would can help me in identification who open the
Excel file (what then computer)?

Kind Regards,
Andrzej