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

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
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,214,646
Messages
6,120,717
Members
448,985
Latest member
chocbudda

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