Shared Workbook

M

Martin

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
 
M

Martin

Thank you, works perfectly.

Martin

The Code Cage Team said:
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
--------------------



--
The Code Cage Team

Regards,
The Code Cage Team
'The Code Cage' (http://www.thecodecage.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top