Hello all,
I have a workbook which strips out most things (toolbar, status bar, formula bar, ply, disables cut/copy/paste).
This occasionally creates a problem when somebody is already working on another workbook and wonders why it suddenly looks strange
My simple workaround for this is to check (on Workbook_Open) if there are any other workbooks already open, and if so prevent this workbook opening:
This works great, except that it doesn't detect a workbook which is open but in 'protected view'.
I don't want to disable protected view, so is there a way to modify my code to include checking for any workbooks open in protected view?
I'm guessing this is to do with how protected view prevents code from being run...
I have another related problem too, but I'll cross this bridge first!
Thanks in advance for any help
I have a workbook which strips out most things (toolbar, status bar, formula bar, ply, disables cut/copy/paste).
This occasionally creates a problem when somebody is already working on another workbook and wonders why it suddenly looks strange
My simple workaround for this is to check (on Workbook_Open) if there are any other workbooks already open, and if so prevent this workbook opening:
Code:
(start of Workbook_Open)
Dim wbsopen
wbsopen = Application.Workbooks.Count
If wbsopen > 1 Then
MsgBox "There are other Excel spreadsheets open at the moment. You must close all other Excel spreadsheets, then try opening this program again"
ThisWorkbook.Close
Exit Sub
End If
This works great, except that it doesn't detect a workbook which is open but in 'protected view'.
I don't want to disable protected view, so is there a way to modify my code to include checking for any workbooks open in protected view?
I'm guessing this is to do with how protected view prevents code from being run...
I have another related problem too, but I'll cross this bridge first!
Thanks in advance for any help