C
cape
I am using this code
Public Sub DeleteHiddenRows()
Dim rDelete As Range
Dim rCell As Range
For Each rCell In ActiveSheet.UsedRange.Columns(1).Cells
If rCell.EntireRow.Hidden Then
If rDelete Is Nothing Then
Set rDelete = rCell
Else
Set rDelete = Union(rDelete, rCell)
End If
End If
Next rCell
If Not rDelete Is Nothing Then rDelete.EntireRow.Delete
End Sub
I would like this to loop through all my open worksheets in a workbook
Is this possible.
Thanks in advance
Help is always appreciate
Public Sub DeleteHiddenRows()
Dim rDelete As Range
Dim rCell As Range
For Each rCell In ActiveSheet.UsedRange.Columns(1).Cells
If rCell.EntireRow.Hidden Then
If rDelete Is Nothing Then
Set rDelete = rCell
Else
Set rDelete = Union(rDelete, rCell)
End If
End If
Next rCell
If Not rDelete Is Nothing Then rDelete.EntireRow.Delete
End Sub
I would like this to loop through all my open worksheets in a workbook
Is this possible.
Thanks in advance
Help is always appreciate