stop excel file opened as read only if already opened by another u

B

bobm

hello,

how do i prevent an excel file being opened as read only if the file is
already opened by another user. this particular file is on the file server
and accessed by multiple users.

What I want is an alert if the file is already opened which says the file
cannot be opened as read only and click ok to close. the alert to inlcude the
username who has the file opened.

workbook sharing is not an option as it breaks my various vba macros

appreciate any help...

cheers
 
S

STEVE BELL

Play with this code (place it in your wb open code)

If ActiveWorkbook.ReadOnly Then ActiveWorkbook.Close FalseEnd If
 

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