Instead of API, use Excel
OnTime[
^] method.
In
ThisWorkBook_Open() event
Application.OnTime Now + TimeValue("00:00:15"), "FolderWatcher"
In the new module
Private Sub FolderWatcher()
Application.OnTime Now + TimeValue("00:00:15"), "FolderWatcher"
End Sub
Closing workbook do not forget to stop procedure "FolderWatcher" setting
Schedule
to
False
Application.OnTime Now, "FolderWatcher", ,False