D
Dorothy
I have created the following macros in my workbook:
Sub Workbook_Open()
Application.CommandBars("Tools").Controls("Protection").Enabled = False
End Sub
Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars("Tools").Controls("Protection").Enabled = True
End Sub
Neither of these macros is working. When I open the file, the Tools
Protection is still enabled. If I run a separate macro to disable the
protection, then save the file and exit, the protection is still disabled.
I am running Excel 2003. The macros are in Module 1 of the worksheet project.
Any help would be very much appreciated!!!!
Thanks!
Sub Workbook_Open()
Application.CommandBars("Tools").Controls("Protection").Enabled = False
End Sub
Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars("Tools").Controls("Protection").Enabled = True
End Sub
Neither of these macros is working. When I open the file, the Tools
Protection is still enabled. If I run a separate macro to disable the
protection, then save the file and exit, the protection is still disabled.
I am running Excel 2003. The macros are in Module 1 of the worksheet project.
Any help would be very much appreciated!!!!
Thanks!