Hello, I am trying to hide/unhide sheets based on whether or not there is text in specific cells. I can get the first command to work, but cannot get the remaining statements to execute. Here is a sample of the first 3 [out of 40 statements] from my code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Range("A13")) Is Nothing Then
If IsEmpty(Range("A13")) Then
Sheets("BOM DTX 1").Visible = xlSheetHidden
Else
Sheets("BOM DTX 1").Visible = xlSheetVisible
End If
End Sub
Private Sub Worksheet_Change1(ByVal Target As Range)
If Not Application.Intersect(Target, Range("A25")) Is Nothing Then
If IsEmpty(Range("A25")) Then
Sheets("BOM DTX 2").Visible = xlSheetHidden
Else
Sheets("BOM DTX 2").Visible = xlSheetVisible
End If
End If
End Sub
Private Sub Worksheet_Change2(ByVal Target As Range)
If Not Application.Intersect(Target, Range("A36")) Is Nothing Then
If IsEmpty(Range("A36")) Then
Sheets("BOM DTX 3").Visible = xlSheetHidden
Else
Sheets("BOM DTX 3").Visible = xlSheetVisible
End If
End If
End Sub
Thank you,
Aaron
Bookmarks