tlc53
Active Member
- Joined
- Jul 26, 2018
- Messages
- 399
Hi there,
I have the below macro assigned to a Check Box on sheet "G2". The Check Box is Unlocked.
I would like both sheets "Beef" and "G2" to be protected.
However, the below macro will not run if sheet "G2" is protected (it runs fine with sheet "Beef" protected and sheet "G2" unprotected).
I have tried inserting ActiveSheet.Unprotect ("") and ActiveSheet.Protect("") into the below code but that doesn't work. Does anyone know how I can get this to work with both sheets protected? Thank you
I have the below macro assigned to a Check Box on sheet "G2". The Check Box is Unlocked.
I would like both sheets "Beef" and "G2" to be protected.
However, the below macro will not run if sheet "G2" is protected (it runs fine with sheet "Beef" protected and sheet "G2" unprotected).
I have tried inserting ActiveSheet.Unprotect ("") and ActiveSheet.Protect("") into the below code but that doesn't work. Does anyone know how I can get this to work with both sheets protected? Thank you
Code:
Sub Beef()
Sheets("Beef").Visible = False
If [Q1] Then Sheets("Beef").Visible = True
End Sub