Hi All.

I have this small piece of code which hides rows in a worksheet dependant upon the data in a cell. It works fine, however it adds 5MB onto the size of the file. If anyone has an alternative method of achieving the same please let me know.

Thanks!

Simon

Sub Hide_Summary_Rows()

'Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False

Sheets("Contract Config").Select
Sheets("Contract Config").Unprotect ("password")
BeginRow = 1
    EndRow = 129
    ChkCol = 41

Columns("ao:ao").Select
Selection.EntireColumn.Hidden = False

    For RowCnt = BeginRow To EndRow
        If Cells(RowCnt, ChkCol).Value = "Out" Then
            Cells(RowCnt, ChkCol).EntireRow.Hidden = True
        End If
    Next RowCnt
Columns("ao:ao").Select
Selection.EntireColumn.Hidden = True
Range("a1").Select
Sheets("Contract Config").Activate
    ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="password"
    
            Application.ScreenUpdating = True
End Sub