how to retrieve list of users sharing a workbook

  • Thread starter Thread starter James McEwan
  • Start date Start date
J

James McEwan

I have a workbook which is shared by a varying number of users at
different times. The user never actually sees the shared book (all
access is via forms and code).
It would be useful for each user to know who else is actually sharing
the workbook at any particular time. I've tried various approaches and
searched archives etc but no success. The Tools...Share Workbook
dialogue box in XL's front end presents a list of sharers but I need to
access this via code and present it in a custom form. The interface for
this is no problem but I cannot currently get access to the list
programmatically.

Can anyone advise how to approach this?
I am using XL 9.0.6926 under Windows XP.
Thanks
James McEwan
 
Hi james;
for example:

Sub UsersList()
If Not ThisWorkbook.MultiUserEditing Then Exit Sub
Dim users, msg As String, i As Integer
users = ThisWorkbook.UserStatus
For i = 1 To UBound(users, 1)
msg = msg & users(i, 1) & " " & Format(users(i, 2), "dd/mm/yy h:mm") & vbLf
Next
MsgBox msg, 64
End Sub

MP
 
Back
Top