Selection.EntireRow.Hidden = True
will hide the rows and
Selection.EntireRow.Hidden = False
will display them..
simple routine to use them could be..
Sub Hide()
RowShow 4, 4, True
End Sub
Sub Show()
RowShow 4, 4, False
End Sub
Sub RowShow(myRow1 As Double, myRow2 As Double, bStatus As Boolean)
If bStatus = True Then bStatus = False Else bStatus = True
Rows(myRow1 & ":" & myRow2).Select
Selection.EntireRow.Hidden = bStatus
End Sub
Where myRow1 and myRow2 are the row numbers, so if you want to hide a single you (ie 4) you enter the same number twice (4,4), or you enter the start and end point for a number of rows (ie 5 to 10)
|