This macro will display a message box advising whether the active workbook was opened 'Read Only' or not.
Copy this macro to the clipboard:
Sub Chk_Status()
If ActiveWorkbook.ReadOnly = True Then
MsgBox ';This workbook was opened 'Read Only'';
Else
MsgBox ';This workbook was not opened 'Read Only'';
End If
End Sub
Press ALT + F11
In the menus at the top of the VBE, select INSERT %26gt; MODULE
Paste the macro into the editing area to the right.
Close the VBE and return to Excel.
Press ALT + F8
When the Macros window opens, highlight the macro and click 'Options..'.
Enter a letter to use as a keyboard shortcut and click 'Ok'.
Close the Macros window and return to Excel.
Press CTRL + your letter to run the macro.
No comments:
Post a Comment