Timed Start Macro Repeat Problem

Rocalli

New Member
Joined
Apr 27, 2005
Messages
10
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?
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,215,584
Messages
6,125,666
Members
449,248
Latest member
wayneho98

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top