Very Hide/ Unhide Sheets with buttons

kayakginge

New Member
Joined
Dec 11, 2017
Messages
19
I am trying to do the following and cannot piece it together.

On a password protected tab called "Advanced Tab"

Have three buttons or circles that do the following.

button 1 - unhide all veryhidden sheets

button 2 - veryhidden 5 sheets called "S2 R", "S2 M", "S2 C", "FT", "Totals"

button 3 - password protect "Advanced Tab" with the same password as used to unlock it (ie same password every time)

If anyone could help i would be very grateful.

Many thanks in advance
 
Last edited:

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Code:
Sub UnhideAllSheets()


Dim ws As Worksheet


For Each ws In ActiveWorkbook.Worksheets


ws.Visible = xlSheetVisible


Next ws


End Sub




Sub VeryHidden()


Dim ws As Worksheet


For Each ws In ActiveWorkbook.Worksheets


If ws.Name = "S2 R" Or ws.Name = "S2 M" Or ws.Name = "S2 C" Or ws.Name = "FT" Or ws.Name = "Totals" Then
ws.Visible = xlSheetVeryHidden
End If


Next ws


End Sub




Sub Password()


ActiveSheet.Protect Password:="YourPassword"


End Sub
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,118
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top