I have the following code,
In the for loop, some rows are hidden
After the loop, I used Autofilter
Problem is, after the Application.Calculation = xlCalculationAutomatic line
Those hidden rows became visible again.
What seems to be lacking here?
Please help me..
Note: All cells have formula in it.
In the for loop, some rows are hidden
After the loop, I used Autofilter
Problem is, after the Application.Calculation = xlCalculationAutomatic line
Those hidden rows became visible again.
What seems to be lacking here?
Please help me..
Note: All cells have formula in it.
Code:
Application.Calculation = xlCalculationManual
For lngRow = Range("A" & Rows.Count).End(xlUp).Row - 8 To 3 Step -9
lngARow= lngRow + 1
lngBRow = lngRow + 4
If Cells(lngARow, 1) = 0 And Cells(lngBRow, 2) = 0 Then
Rows(lngRow & ":" & lngRow + 8).Select
Selection.EntireRow.Hidden = True
End If
Next lngRow
Range("$A$2:$R$2").AutoFilter Field:=1, Criteria1:=Array("02", "04", "05", "08", "09"), Operator:=xlFilterValues
Application.Calculation = xlCalculationAutomatic
Last edited: