mkvarious
New Member
- Joined
- Jan 24, 2013
- Messages
- 44
hello,
I am trying to write a code that fires when user filters data.
I have tried using Workbook_SheetCalculate in the ThisWorkbook module but although I first have Application.EvanbleEvents=False line then macro still fires twice.
This is really strange as on many threads I have read this is supposed to work?[\color]
I am trying to write a code that fires when user filters data.
I have tried using Workbook_SheetCalculate in the ThisWorkbook module but although I first have Application.EvanbleEvents=False line then macro still fires twice.
This is really strange as on many threads I have read this is supposed to work?[\color]
Code:
Private Sub Workbook_SheetCalculate(ByVal Sh As Object)
Application.EnableEvents = False
Set Sh = Sheets("TT_forecast tab")
If Sh.FilterMode = True Then
MsgBox "tak!"
End If
Application.EnableEvents = True
End Sub
[\code]