Thread: Shared Workbook
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
The Code Cage Team[_129_] The Code Cage Team[_129_] is offline
external usenet poster
 
Posts: 1
Default Shared Workbook


Excel uses Application.Username but any user can chage their Excel name
anytime they want in the options, so its best to use Environ(username),
just use it in the workbook open event to write to a hidden worksheet,
add a sheet and call it Names then use this in the workbook_open event:

Code:
--------------------
With ThisWorkbook.Worksheets("Names").Cells(Rows.Count, "A").End(xlUp)
.offset(1, 0).Value = Environ("username")
.offset(1, 1).Value = Format(Now, "ddd dd mmmm yyyy")
.offset(1, 2).Value = Format(Now, "hh:mm")
End With
--------------------
Martin;157427 Wrote:
Hello,

I am trying to find out how to get the details of all users logged in
to a
shared workbook.

This information is available in Excel via the Tools | Share Woorkbook
menu
but I need to find out how to get that list of user names. I assume
Excel is
using Environ("username").

Does anyone have any ideas?

Thanks in advance.

Martin



--
The Code Cage Team

Regards,
The Code Cage Team
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
The Code Cage Team's Profile: http://www.thecodecage.com/forumz/member.php?userid=2
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=43662