Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Slow Performance Hiding Rows
I have a loop hiding blank rows. It just seems to run very slowly.
What can I do to increase the speed of this code? Private Sub Worksheet_Activate() Dim rng As Range Set rng = Range(Cells(6, 7), Cells(6, 7).End(xlDown)) Hide_Rows rng End Sub Public Sub Hide_Rows(rng) Application.ScreenUpdating = False Dim r As Range Dim row As Long rng.Select For Each r In Selection r.Select row = ActiveCell.row Application.StatusBar = "Row " & row If IsEmpty(r) Or r = "None" Then Selection.EntireRow.Hidden = True Else Selection.EntireRow.Hidden = False End If Next r Application.StatusBar = False Application.ScreenUpdating = True End Sub Thanks, Brent |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Slow performance after print preview | Excel Discussion (Misc queries) | |||
Excel performance running slow | Excel Discussion (Misc queries) | |||
excel file performance slow | Excel Discussion (Misc queries) | |||
Very slow performance while exploring. | Excel Discussion (Misc queries) | |||
Spreadsheet performance is slow | Excel Worksheet Functions |