Detecting open workbook

G

Guest

My application is stored on a server that can be accessed by a number of users.

When the workbook is already in open by a user and another person opens it,
they get the warning to either not open, be notified or open as read only.

How can I detect this and force the workbook to open as read only in VBA code?

I need to detect it as I want to control the workbook save/close events and
ignore any changes.

Cheers
 
G

Guest

I am not sure you can detect that, but in the events you can do

if thisworkbook.ReadOnly then exit sub
 
G

Guest

Hi Tom
That is a pity. What you are saying is that after the user chooses READ
ONLY, only then can I detect a read open status.

Is there another way of testing if a server file is already open? I could
then create a local application that runs a test before it goes off and opens
the remote file. Or do I run into the same issue again?

Cheers
Nigel
 

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