Forum Discussion
CatherineMadden
Jun 25, 2024Copper Contributor
Lock/Unlock All Tabs
I have the macro below to lock/unlock all of the tabs at 1 time. How do I add a line to use ALT+L to lock and ALT+U to unlock? Sub ProtectAll() Dim wsh As Worksheet For Each wsh In Worksheets ...
JKPieterse
Jun 25, 2024Silver Contributor
There are two ways to do that.
1. Application.OnKey (check out Help) turn on in your Workbook_Open and off in workbook_BeforeClose event
2. From the Macros dialog (alt+F8 from Excel), select a macro and click Options.
1. Application.OnKey (check out Help) turn on in your Workbook_Open and off in workbook_BeforeClose event
2. From the Macros dialog (alt+F8 from Excel), select a macro and click Options.