![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Feb 2002
Posts: 18
|
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 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Kobe, Japan
Posts: 1,420
|
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 |
|
New Member
Join Date: Feb 2002
Posts: 18
|
Thanks Colo!!
May the luck be with you...... Lucky |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|