Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: User ID/Network Logon

  1. #1
    New Member
    Join Date
    Feb 2002
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi All
    Is it possible to have a function that runs with Auto_open of a workbook that can return the users ID or Network Logon to a cell in that work book??

    Thanks in anticipation.





  2. #2
    MrExcel MVP
    Colo's Avatar
    Join Date
    Mar 2002
    Location
    Kobe, Japan
    Posts
    1,456
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    2 Thread(s)

    Default

    Hi! Please copy this into a standard module

    Sub Auto_Open()
    Dim objWSH As Object
    Set objWSH = CreateObject("WScript.Network")
    Cells(1, 1).Value = "UserDomain " & objWSH.UserDomain
    Cells(2, 1).Value = "ComputerName " & objWSH.ComputerName
    Cells(3, 1).Value = "UserName " & objWSH.UserName
    End Sub

  3. #3
    New Member
    Join Date
    Feb 2002
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks Colo!!

    May the luck be with you......

    Lucky

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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