Prevent two network users from opening same workbook?

E

Ed

If a workbook is already open and a user tries to open it across a
network connection, they get the "Read Only / Notify" dialog. Is
there a convenient way to detect that one user already has the
workbook open, and prevent a second user from opening the file at all,
not even as Read Only?

Ed
 
J

John.Greenan

There is no "convenient way" to do this. It can be done but is not
convenient as it requres using Windows API calls and a lot of faffing about.
 
N

NickHK

Ed,
You can add code to workbook's Open event and see if its .ReadOnly property
is true.
Then put up a msgbox and .Close.

However, if the user disables macros/events, then this will not function.
Or if the user actually wants it open as ReadOnly.

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top