+ Reply to Thread
Results 1 to 8 of 8

Very serious question !!!

  1. #1
    And1
    Guest

    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. #2
    Chip Pearson
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    >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. #3
    Jim Thomlinson
    Guest

    RE: 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. #4
    peter
    Guest

    RE: 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. #5
    And1
    Guest

    Re: 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. #6
    And1
    Guest

    Re: 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. #7
    And1
    Guest

    Re: Very serious question !!!

    the same question that to Mr Pearson

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


  8. #8
    peter
    Guest

    Re: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1