Identifying a Read Only status

J

Joe Mac

I'm looking for assistance in disabling a Macro when a file is opened as
"Read Only"

I've got a spreadsheet that uses a form to capture data and stores it in
worksheet for later reporting and viewing... all works fine with the
exception that multiple users can't share access for data entry... even
though Excel generates a message indicating that the file is locked by
another user, the data form can still be accessed so the user is under the
mistaken impression that the data they have entered has been saved... I'd
like to be able to identify the workbook open "status" and simply Exit the
Show Form macro if the status is "Read Only"... Where do I look for the
workbook status?

Thank you for your assistance in advance-
 
J

Joe Mac

I think I found the answer...

ActiveWorkbook.ReadOnly...

So I can simply do something like
If ActiveWorkbook.ReadOnly Then
Msgbox "Data Entry not allowed in Read Only mode"
Exit Sub
End If

Am I correct?
 
P

Patrick Molloy

you are correct



Joe Mac said:
I think I found the answer...

ActiveWorkbook.ReadOnly...

So I can simply do something like
If ActiveWorkbook.ReadOnly Then
Msgbox "Data Entry not allowed in Read Only mode"
Exit Sub
End If

Am I correct?
 

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