I think, the way the code is created, it will remove all users. Reason being that 'Workbook.UserStatus' creates an array of all users currently in the workbook:
https://learn.microsoft.com/en-us/of...ook.userstatus
The loop then proceeds to remove every user that is in the array, therefore removing every user.
This would have the same effect as unsharing the workbook and then resharing it (this is what I do to files at my workplace)
I use shared workbooks at work with VBA, the only way to get to the VBA in a shared workbook is to unshare it, you are not able to edit/ view code while the workbook is shared.
To remove a specific user would be something like the below (Untested)
Sub Remove_User()
Dim UsrList()
UsrList = ThisWorkbook.UserStatus
For i = 1 To UBound(UsrList)
If UsrList(i, 1) = "Joe Bloggs" Then
ThisWorkbook.RemoveUser (i)
End If
Next
End Sub
Not sure if the 'UsrList(i, 1)' should be 'UsrList(i)' or 'UsrList(i, 1)' as i can't test due to all of my shared workbooks being full of users as i work for a 24 hour company.