Apply Autohide Rows VBA code to entire workbook in Excel 2013

[Closed]
Report
-
Hello,
I want to apply this code to all worksheets:

Private Sub Worksheet_Calculate()
Dim LastRow As Long, c As Range
Application.EnableEvents = False
LastRow = Cells(Cells.Rows.Count, "D").End(xlUp).Row
On Error Resume Next
For Each c In Range("D15:D" & LastRow)
If c.Value = 88 Then
c.EntireRow.Hidden = True
ElseIf c.Value = "" Then
c.EntireRow.Hidden = False
End If
Next
On Error GoTo 0
Application.EnableEvents = True
End Sub



Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!