Thank you Georgiboy. My first impression was that it removed everyone, but a workbook needs an owner, since the current user must then become the default owner who is able to control the read & write permissions. However I wasn't sure, so didn't try and test it.
Ive seen a slightly different version of removing a user where it didn't use the user name but a position on the list.
Sub Remove_User() Dim UsrList() UsrList = ThisWorkbook.UserStatus For i = 1 To UBound(UsrList) If UsrList(i, 1) = User.2 Then ThisWorkbook.RemoveUser (i) End If Next End Sub
The disadvantage with this one is that you could potentially knock the wrong person out of the workbook if you got the position count wrong.