Hi
My knowledge of VB is pretty limited and I have tried with no success to find a macro that will unhide/hide sheets depending on a returned value in once particular cell. I have pretty much read every forum post and am still stumped.
So far I have got this but I know that Worksheet_Change doesn't run when the value of the target cell contains a formula (an IF "true or false" formula)
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Address <> "$B$59" Then Exit Sub
If Target.Value = "TRUE" Then
Worksheets("Sheet1").Visible = xlSheetVisible
Worksheets("Sheet2").Visible = xlVeryHidden
Worksheets("Sheet3").Visible = xlVeryHidden
Else
Worksheets("Sheet1").Visible = xlSheetVisible
Worksheets("Sheet2").Visible = xlSheetVisible
Worksheets("Sheet3").Visible = xlSheetVisible
End If
End Sub
I have looked at Worksheet_Calculate but just don't know what to go.
Any help would be much appreciated.
Thanks
Ben
Bookmarks