3x Checkboxes - Hide/Unhide sheet

tlc53

Active Member
Joined
Jul 26, 2018
Messages
365
Yes, I copied your code and replaced it.
It works if "G2" is Unprotected and "Beef" is Protected, but it won't work if both sheets are Protected.
 

Some videos you may like

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
12,202
Office Version
2007
Platform
Windows
Yes, I copied your code and replaced it.
It works if "G2" is Unprotected and "Beef" is Protected, but it won't work if both sheets are Protected.
Try this

Code:
Sub Beef()
    activesheet.Unprotect
    Sheets("Beef").Unprotect
    Sheets("Beef").Visible = False
    If [Q1] Then Sheets("Beef").Visible = True
    Sheets("Beef").Protect
    activesheet.Protect
End Sub
 

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
12,202
Office Version
2007
Platform
Windows
Sorry, but I do not understand.
You can tell step-by-step what to do in your file and what you expect in each step.
 

tlc53

Active Member
Joined
Jul 26, 2018
Messages
365
Thank you, all sorted now.
It was me being a dope! Cell Q1 was locked :rolleyes:
 

Watch MrExcel Video

Forum statistics

Threads
1,102,455
Messages
5,487,002
Members
407,575
Latest member
calc

This Week's Hot Topics

Top