View Full Version : Solved: Test if rows are hidden
Djblois
08-19-2008, 07:53 AM
I know how to loop through every row and test if they are hidden but is it possible to test every row in one shot (I dont want to loop because a worksheet could be thousands of rows and it will take a really long time). All I want is for it to return a true value if possible.
Bob Phillips
08-19-2008, 08:20 AM
Sub ClassTest()
Dim rng As Range
Set rng = Range("A1:A100")
If rng.SpecialCells(xlCellTypeVisible).Rows.Count = rng.Rows.Count Then
MsgBox "No rows hidden"
Else
MsgBox "Some rows hidden"
End If
End Sub
Djblois
08-19-2008, 08:50 AM
Thank you that worked perfectly
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.