LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Fid Fid is offline
external usenet poster
 
Posts: 2
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Slow performance after print preview SV[_2_] Excel Discussion (Misc queries) 1 October 30th 09 12:24 PM
Excel performance running slow juliejg1 Excel Discussion (Misc queries) 5 December 18th 07 10:08 PM
excel file performance slow inenewbl Excel Discussion (Misc queries) 2 April 25th 07 01:30 PM
Very slow performance while exploring. Gargoyl Excel Discussion (Misc queries) 1 April 24th 06 08:51 AM
Spreadsheet performance is slow Kristi Excel Worksheet Functions 7 January 5th 06 03:17 PM


All times are GMT +1. The time now is 10:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"