I use the following code to refresh an autofilter in Excel upon a cell change.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim MySheet As Worksheet
'On Error Resume Next
'Set MySheet = Application.ActiveSheet
'MySheet.Columns(1).AutoFilter.ApplyFilter
'On Error Resume Next
'Application.EnableEvents = False
Worksheets("Basisgegevens").Range("$A$1:$A$146").AutoFilter Field:=1, Criteria1:=Array("0", _
"2", "="), Operator:=xlFilterValues
'Application.EnableEvents = True
'On Error GoTo 0
End Sub
I use this to hide rows based on certain criteria.
And for that it works really well.
The problem
However when I set validation on a cell and add one of those cool dropdown lists.

To get the cell to look like this:

That part works fine, but as soon as I choose a different value that causes the autofilter to hide/display different cells excel crashes
My theory
The validation drop down changes a cell.
This triggers the VBA code shown above.
However the validation code is still running, whilst the filter settings get reinitialized.
This causes Excel to crash.
How do I fix this?
Will running the VBA event delayed somehow help?
How do I do that?
It looks like a racing condition, if the filter is reapplied before calculation has finished it will make Excel crash.
This does require a large sheet so that calculation takes long enough for this to occur.
Here’s the work around: