Identifying a Read Only status

  • Thread starter Thread starter Joe Mac
  • Start date Start date
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-
 
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?
 
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?
 
Back
Top