How do I conditionally hide a worksheet

  • Thread starter Thread starter Jeremehovah
  • Start date Start date
J

Jeremehovah

I would like to have different worksheet tabs that are only viewable based on
answers given on a main page. Say I have 4 conditional pages, based on 1 of
4 answers given on that main page only one would be viewable and the other
three would remain hidden.

Is this even possible?
 
I don't know of a way to do that with a formula, but you could use a
worksheet change macro like this:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Range("B7").Address And Target.Formula =
"Hide" Then
Worksheets("Sheet2").Visible = False
End If
End Sub

It will hide Sheet2 if B7 is changed and it is changed to the word
Hide.
Don't forget to write a way for it to return ;)
 
Back
Top