![]() |
Shared Workbook
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 |
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 |
Shared Workbook
Thank you, works perfectly.
Martin "The Code Cage Team" wrote: 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 |
All times are GMT +1. The time now is 09:32 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com