Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Filter event
Hi all
How can I catch a filter event? I found, that there is no such event, but I rely on, that someone has invented something... WBR Sonnich |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Filter event
On Jun 2, 8:04*pm, jodleren wrote:
Hi all How can I catch a filter event? I found, that there is no such event, but I rely on, that someone has invented something... WBR Sonnich Well, I came up with this: Private Sub Workbook_SheetCalculate(ByVal Sh As Object) Dim iHidden, iRow As Integer Dim ws As Worksheet If Worksheets("BOM").Cells(1, 28).Value = "" Then Worksheets("BOM").Cells(1, 28).Value = "X" // check whether we are running Application.ScreenUpdating = False Application.DisplayAlerts = False With Worksheets("BOM") ' find plase to store hidden data iHidden = 1 While .Cells(6, iHidden).Text < "" iHidden = iHidden + 1 Wend iRow = 7 While .Cells(iRow, 1).Value < "" If .Cells(iRow, iHidden).Value < "" Then // if row is marked, then hide it .Rows(iRow).Hidden = True End If iRow = iRow + 1 Wend End With Application.ScreenUpdating = True Application.DisplayAlerts = True Worksheets("BOM").Cells(1, 28).Value = "" // we are done End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Capture Filter 'AfterUpdate' event in Pivot Table | Excel Programming | |||
Pivot table filter - Selected Item Event | Excel Programming | |||
auto-filter change not triggering worksheet_change event | Excel Programming | |||
How do I get Pivot filter change event to fire? | Excel Programming | |||
Adv. Filter & Worksheet Change Event | Excel Programming |