Hello All
I was hoping one of you kindly experts would help resolve a problem for me, or at least point me in the right direction, please.
I have a macro that is set to start at 7:59 am every day. I have used the:
Application.OnTime TimeValue("07:59:00"), "Mymacro"
Code for this. The macro itself pulls data from an external data source and then runs some analysis and mails out breach type results. All this works fine.. except..
For some reason the macro doesn't run once, it runs 4 times. Hence people recieve 4 identical emails for each parameter breached.
I have tried using the code
Application.OnTime TimeValue("07:59:00"), "Mymacro", schedule:=False
to switch it off after running, but the problem with this is it won't start again the next day.
Am I missing something obvious here? Why would my macro keep looping four times?
The run time for this isn't long, probably less than 1 minute, but longer than 15 seconds, so it seems to be running past the 7:59 trigger. It shouldn't be doing this should it?
I was hoping one of you kindly experts would help resolve a problem for me, or at least point me in the right direction, please.
I have a macro that is set to start at 7:59 am every day. I have used the:
Application.OnTime TimeValue("07:59:00"), "Mymacro"
Code for this. The macro itself pulls data from an external data source and then runs some analysis and mails out breach type results. All this works fine.. except..
For some reason the macro doesn't run once, it runs 4 times. Hence people recieve 4 identical emails for each parameter breached.
I have tried using the code
Application.OnTime TimeValue("07:59:00"), "Mymacro", schedule:=False
to switch it off after running, but the problem with this is it won't start again the next day.
Am I missing something obvious here? Why would my macro keep looping four times?
The run time for this isn't long, probably less than 1 minute, but longer than 15 seconds, so it seems to be running past the 7:59 trigger. It shouldn't be doing this should it?