LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default faster way to hide rows w/o using autofilter?

I'm trying to hide rows without using autofilter (I need to execute
code when filter choice is changed and don't want to have to use
Worksheet_Calculate because of all the complications it can cause), so
I"m using a dropdown from the forms toolbar. My problem is the
execution is slow. Is there a faster way to do this? Here's my code:

Public Sub DropDownBU_Change(Optional bPrinting As Boolean)
Dim strBUChoice As String, r As Range, rngEmployees As Range
Application.ScreenUpdating = False
Cells.Rows.Hidden = False
strBUChoice = Range("CurrentFilterSetting").Text
Set rngEmployees = Range("EmployeeTable")
For Each r In rngEmployees.Rows
If Intersect(r, Range("BUColumn")).Value < strBUChoice Then
r.Hidden = True
Next r
Application.ScreenUpdating = True
End Sub

 
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
Hide Rows based on value, but not using autofilter Richhall[_2_] Excel Worksheet Functions 2 November 11th 09 02:31 PM
Hide ALL dropdowns on autofilter Kenny Excel Discussion (Misc queries) 15 October 1st 07 11:33 PM
Can faster CPU+larger/faster RAM significantly speed up recalulati jmk_li Excel Discussion (Misc queries) 2 September 28th 05 10:24 AM
Faster AutoFilter? John[_88_] Excel Programming 3 December 16th 04 02:32 AM
Any delete rows macro faster than this one??? nancy Excel Programming 9 January 25th 04 01:50 PM


All times are GMT +1. The time now is 04:28 AM.

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

About Us

"It's about Microsoft Excel"