ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Identifying a Read Only status (https://www.excelbanter.com/excel-programming/433780-identifying-read-only-status.html)

Joe Mac

Identifying a Read Only status
 
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-
--
Joe Mac

Joe Mac

Identifying a Read Only status
 
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?
--
Joe Mac


"Joe Mac" wrote:

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-
--
Joe Mac


Patrick Molloy[_2_]

Identifying a Read Only status
 
you are correct



"Joe Mac" wrote:

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?
--
Joe Mac


"Joe Mac" wrote:

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-
--
Joe Mac



All times are GMT +1. The time now is 07:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com