05-23-2007, 04:55 AM
05-23-2007, 06:37 AM
Declare the var, point it at a cell, check to see if the value of the cell is 1, if it is, hide the row, if it isn't unhide it (EntireColumn is another option)Sub hideColumns() Dim Rng As Range Set Rng = Range("B1") If (Rng = 1) Then Rng.EntireRow.Hidden = True Else Rng.EntireRow.Hidden = False End If End Sub