I have a shared workbook, and I want a message box to return to me who (if anyone) is in the file before my macro unshares it automatically so people don't lose their work. I found this code which inputs the users onto a worksheet, but I want to work it into my code as more of an error handling thing. Of course, it would need to exclude myself. Here is what I have thus far:
Code:
Dim vUsers As Variant
vUsers = Activeworkbook.UserStatus
'Write list to active worksheet
ActiveSheet.Cells(1, 1).Resize(UBound(vUsers, 1), UBound(vUsers, 2)).Value = vUsers