Inside an excel workbook I have sheet1 and sheet2.
In Sheet1 I have a cell that changes dynamically (cell A1). In Sheet2 I have a cell (B1) that copies the value from cell A1 from Sheet1. On Sheet 2 cells will hide when the value in B1 is 0.
Here is the VBA code from sheet2
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("B1").Value = "0" Then
Columns("E:I").EntireColumn.Hidden = True
Else
Columns("E:I").EntireColumn.Hidden = False
End If
End Sub
The thing is that when I change the value on Sheet1 nothing happens on Sheet2, and I donĀ“t know why.