Hi,
Here is one way,
In ThisWorkBook Mod Place this open workbook code
Private Sub Workbook_Open()
With Application
.Calculation = xlAutomatic
.MaxChange = 0.001
End With
ActiveWorkbook.PrecisionAsDisplayed = False
Range("IE65000").Formula = "=NOW()"
MsgBox "Workbook has been set to calculate automatically"
End Sub
Then Place This in the worksheet your filter is on.
Option Explicit
Private Sub Worksheet_Calculate()
Dim wks As Worksheet, i As Long
Set wks = ActiveSheet
With wks.AutoFilter
With .Filters
For i = 1 To .Count
With .Item(i)
If .On Then
If .Criteria1 Like "*8" Then
Columns("S:U").Hidden = False
Exit Sub
Else
Columns("S:U").Hidden = True
End If
End If
End With
Next
End With
End With
End Sub
This will force the sheet to calculate forcing the script to fire. Here is a test book as well.
Bookmarks