غير الكود الموجود في الحالة الاولى بالكود التالي
Private Sub CommandButton1_Click()
With Application
.ScreenUpdating = False
.EnableEvents = False
For s = 1 To 400
For t = 1 To 9
If Cells(s + 1, t + 2).Value = 0 And Cells(s + 1, 4).Value = 0 Then
Cells(s + 1, t + 2).EntireRow.Hidden = True
Else
Cells(s + 1, t + 2).EntireRow.Hidden = False
End If
Next
Next
.ScreenUpdating = True
.EnableEvents = True
End With
End Sub