mrMadCat
New Member
- Joined
- Jun 8, 2016
- Messages
- 39
- Office Version
- 365
- Platform
- Windows
- Mobile
- Web
Hello again.
I need a macro to be started after some time after event of selection change. If the event repeats before the timer has run off - the timer should be reset.
I've made this code but it doesn't reset time. Please help understand what is wrong.
I need a macro to be started after some time after event of selection change. If the event repeats before the timer has run off - the timer should be reset.
I've made this code but it doesn't reset time. Please help understand what is wrong.
Code:
Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
On Error Resume Next
Application.OnTime Endtime, "Other_Macro", , False
Endtime = Now + TimeValue("00:00:05")
Application.OnTime Endtime, "Other_Macro", , True
End Sub