File Sharing Problems

Prevent Multiple Users from Editing an Excel Workbook in SharePoint

Camila MilosovichCamila Milosovich Nov 22, 2026 869 views

Question details

The user needs exclusive editing access to a specific Excel workbook stored in SharePoint Online.

Prevent Multiple Users from Editing an Excel Workbook in SharePoint
Product
Microsoft Excel and SharePoint Online
Device & OS
not provided
Scenario
A VBA-enabled workbook generates unique numbers, and simultaneous editing could produce duplicate values.
Observed behavior
SharePoint Online allows multiple users to edit the workbook at the same time, creating a risk of duplicate numbers.
Before you start

Make sure the workbook is stored in a SharePoint Online document library and that you have permission to edit and check it out. Ask other users to close the workbook before you check it out, and use desktop Excel to run its VBA macros.

Solution 1Recommended

Check out the workbook before editing

Use SharePoint checkout to give one user exclusive write access until the workbook is checked back in.

1
Find the workbook

Open the SharePoint document library and locate the workbook you want to edit.

2
Check out the file

Select the workbook, open the More options menu, and choose Check out. Alternatively, in the connected Excel desktop workbook, choose File > Info > Manage Workbook > Check Out if that option is available.

3
Edit in desktop Excel

Open the checked-out workbook in the Excel desktop app, run the required VBA workflow, and save your changes.

4
Check in the workbook

Return to the SharePoint library, select the workbook, and choose More options > Check in. Add a comment if prompted and confirm so others can edit it.

Check out the workbook before editing
Checkout requires a consistent process: Users must check out the workbook before editing and check it in afterward. If a crash leaves it checked out, the user or an authorized SharePoint administrator can check it in or discard the checkout; discarding may lose changes made during checkout.
Free Microsoft Office alternative

Work with Excel Files Using WPS Office

WPS Office is a free, lightweight Office alternative with a familiar interface for working with spreadsheets. Its Microsoft Office format compatibility helps you move existing files into WPS, although SharePoint checkout remains a Microsoft feature.

Open and edit spreadsheets in a familiar interfaceCompatible with Microsoft Excel formats such as XLSXReview workbook data and generated numbers in WPS SpreadsheetUse a free, lightweight office suite
QA img-9

Frequently Asked Questions

Can other users edit the workbook while it is checked out?

SharePoint checkout reserves write access for the user who checked out the file. Others must wait until it is checked in before editing it.

What happens if Excel crashes while the workbook is checked out?

The workbook may remain checked out. In the SharePoint library, the user who checked it out or an authorized administrator can check it in or discard the checkout. Discarding may lose changes made during checkout.

Can VBA check out the workbook automatically?

Yes. In desktop Excel, VBA can use Workbooks.CanCheckOut to test availability and Workbooks.CheckOut with the SharePoint file URL before opening the workbook. Handle failures and include a check-in process.

Does checkout guarantee that VBA-generated numbers are unique?

Checkout reduces the risk from simultaneous edits when everyone follows the process, but it does not validate the numbering logic. Test the VBA workflow and how it handles errors before relying on it.