Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Very serious question !!!

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Very serious question !!!

Try

Debug.Print Environ("username")
Debug.Print Environ("computername")


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"And1" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Very serious question !!!

Environ("UserName")
Environ("ComputerName")
--
HTH...

Jim Thomlinson


"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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Very serious question !!!

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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Very serious question !!!

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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Very serious question !!!

Does this work in system Novell only?
I need include some library?
How to use this the simplest method?


this Sub will be correct? (should be work?)
Private Sub CommandButton6_Click()
Dim UName, CName As String

UName = Environ("userername")
UName = Environ("computername")
MsgBox "Your Login=" & vbCrLf & UName
MsgBox "Your Login=" & vbCrLf & CName
' maybe only
Debug.Print Environ("username")
Debug.Print Environ("computername")
End Sub


Kind Regards,
Andrzej

Chip Pearson napisał(a):
Try

Debug.Print Environ("username")
Debug.Print Environ("computername")


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Very serious question !!!

the same question that to Mr Pearson

Jim Thomlinson napisaƂ(a):
Environ("UserName")
Environ("ComputerName")

  #8   Report Post  
Posted to microsoft.public.excel.programming
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 Macro/VB Question DDE Question MadDog22 Excel Worksheet Functions 1 March 10th 10 01:47 AM
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good davegb Excel Programming 1 May 6th 05 06:35 PM
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you [email protected] Excel Programming 0 April 27th 05 07:46 PM
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you [email protected] Excel Programming 23 April 23rd 05 09:26 PM
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you [email protected] Excel Programming 0 April 22nd 05 03:30 PM


All times are GMT +1. The time now is 03:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"