ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Check if Workbook is shared (https://www.excelbanter.com/excel-programming/409472-check-if-workbook-shared.html)

Ladymuck

Check if Workbook is shared
 
I would like an alert to pop up if someone tries to run a macro while the
workbook is in shared rather than exclusive mode. How would I do this?

Many thanks
Louise

Dan R.

Check if Workbook is shared
 
Try this:

If ThisWorkbook.MultiUserEditing Then
MsgBox "Shared"
End If

--
Dan


On Apr 16, 10:05*am, Ladymuck
wrote:
I would like an alert to pop up if someone tries to run a macro while the
workbook is in shared rather than exclusive mode. How would I do this?

Many thanks
Louise


Ladymuck

Check if Workbook is shared
 
How simple is that! Thank you very much.

"Dan R." wrote:

Try this:

If ThisWorkbook.MultiUserEditing Then
MsgBox "Shared"
End If

--
Dan


On Apr 16, 10:05 am, Ladymuck
wrote:
I would like an alert to pop up if someone tries to run a macro while the
workbook is in shared rather than exclusive mode. How would I do this?

Many thanks
Louise




All times are GMT +1. The time now is 08:28 AM.

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