Finding the Username of a user who has a shared Network file open.

K

Ken

How can I find the Username of the user who has a shared
network Excel file open, using VBA.
 
M

Michel Pierron

Hi Ken,
Sub UsersList()
Dim users, msg As String
users = Workbooks("MyBook.xls").UserStatus
For Row = 1 To UBound(users, 1)
msg = msg & users(Row, 1)
Next
MsgBox msg, 64
End Sub

Regards,
MP
 
Top