How to prevent an Excel file from being opened simultaneously by a different user on a network?

stormcloud

New Member
Joined
Sep 19, 2017
Messages
2
Software situation: Windows 10 and Excel 2013. in an INTRANET there is an attendance list generated by Excel and saved (with VBA) as a pdf-file. If someone wants to modify his attendance record — for example to change his flexible working hours or free time — then he could open the underlying Excel-sheet using Excel through a php-link. So far, so good, this works fine.

Here is the problem: when a second user tries to modify his attendance list, he receives no warning that the Excel-sheet is already open. Both users modify their data, however only the data of the user who last closes the Excel-sheet is saved. The data of the user who first closes is lost (or the inverse—not certain).

If you do the same procedure with the Explorer in WINDOWS, you get the message that the file can be opened in read-only mode.

How should I deal with this case? How can I integrate a VBA-script which prevents the simultaneous access by two or more users?
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
IntraNet.
Is the file being opened in a local session of Excel (desktop) or in a Web-Based Excel?
 
Upvote 0
Databases intrinsically handle multiple users. Have the Excel file as a front end & store the data in an mdb file. Then multiple users can make changes at the same time.
 
Upvote 0
The file is opened in a local session of Excel

If stored on a SharePoint or OneDrive location, then the file is copied to local desktop and then handled by the desktop application. Sharing and multi-user editing only works when using the web-app and OneDrive or OneDrive for Business (aka SharePoint). SharePoint environments can also present a different method where the file is checked out, preventing other users from editing.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top