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
wsh.Protect Password:=”1020″
Next wsh
End Sub
Sub UnprotectAll()
Dim wsh As Worksheet
For Each wsh In Worksheets
wsh.Unprotect Password:=”1020″
Next wsh
End Sub
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 WorksheetFor Each wsh In Worksheetswsh.Protect Password:=”1020″Next wshEnd SubSub UnprotectAll()Dim wsh As WorksheetFor Each wsh In Worksheetswsh.Unprotect Password:=”1020″Next wshEnd Sub Read More