ExclusiveAccess Method Example

This example determines whether the active workbook is open as a shared list. If it is, the example gives the current user exclusive access.

If ActiveWorkbook.MultiUserEditing Then
    ActiveWorkbook.ExclusiveAccess
End If