Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default help on windows login name, dear Chip Pearson

i have referred to couple of posts that were there before, but could
not get what i really wanted.

I have a shared worksheet where number of people updates a data
simultaneously.

I want a macro to get the name of person as per windows login in
column 'e' who has entered any data in column'd'

I tried answers from couple of previous post, but could not have this
answer as the nearest solution i got will not work when the shared
work book is used simultaneously.

i have tried this

Function Name() As String
Name = Environ("Username")
End Function


Help needed
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default help on windows login name, dear Chip Pearson

Environ("Usename") will return the name of the user logged into the current
seesion the code is run in, maybe nothing to do with the shared workbook.

This is straight from help

UserStatus Property
See AlsoApplies ToExampleSpecifics
Returns a 1-based, two-dimensional array that provides information about
each user who has the workbook open as a shared list. The first element of
the second dimension is the name of the user, the second element is the date
and time when the user last opened the workbook, and the third element is a
number indicating the type of list (1 indicates exclusive, and 2 indicates
shared). Read-only Variant.

Remarks
The UserStatus property doesn't return information about users who have the
specified workbook open as read-only.

Example
This example creates a new workbook and inserts into it information about
all users who have the active workbook open as a shared list.

users = ActiveWorkbook.UserStatus
With Workbooks.Add.Sheets(1)
For row = 1 To UBound(users, 1)
.Cells(row, 1) = users(row, 1)
.Cells(row, 2) = users(row, 2)
Select Case users(row, 3)
Case 1
.Cells(row, 3).Value = "Exclusive"
Case 2
.Cells(row, 3).Value = "Shared"
End Select
Next
End With

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"hoysala" wrote in message
...
i have referred to couple of posts that were there before, but could
not get what i really wanted.

I have a shared worksheet where number of people updates a data
simultaneously.

I want a macro to get the name of person as per windows login in
column 'e' who has entered any data in column'd'

I tried answers from couple of previous post, but could not have this
answer as the nearest solution i got will not work when the shared
work book is used simultaneously.

i have tried this

Function Name() As String
Name = Environ("Username")
End Function


Help needed



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
Thank you Chip Pearson Michael Excel Discussion (Misc queries) 3 February 5th 05 08:35 PM
Chip Pearson- you're web page is down scott Excel Discussion (Misc queries) 8 January 27th 05 11:49 PM
Chip Pearson Ricardo[_2_] Excel Programming 0 November 10th 03 07:51 PM
CHIP PEARSON - THANX bertieBassett Excel Programming 0 November 3rd 03 02:01 PM
Chip Pearson or someone Chip Pearson Excel Programming 3 September 18th 03 05:22 AM


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

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

About Us

"It's about Microsoft Excel"