Hello,
I’m not sure this is even possible but I’ll start here.
I have a routine (cmdPmtMade_Click) that for the most part works fine. However, as the routine is run numerous times the whole process begins to slow down. Over time, what initially takes a couple seconds to run can progress to nearly a minute. I have tried to see what is causing this but was unsuccessful in my review.
I have a second routine that basically copies all the data from one worksheet to another then re-saves the file under the original name. After running this “Repair” sub, the “PmtMade” sub (and others) works great for awhile until it again begins to slow down. If I rerun the REPAIR, all is fine again for some time.
What I was thinking of is some way that if the original routine (PmtMade) takes more that X number of seconds, a message box would appear prompting the user to run the “Repair” routine to speed up the process.
So, my question – Is there some command that when “PmtMade” button is clicked after a specified time (say 10 seconds), will trigger some other code or message box ? I tried Application.OnTime but could not get that to work (I probably had something set wrong).
Thanks for viewing,
Steve K.
I’m not sure this is even possible but I’ll start here.
I have a routine (cmdPmtMade_Click) that for the most part works fine. However, as the routine is run numerous times the whole process begins to slow down. Over time, what initially takes a couple seconds to run can progress to nearly a minute. I have tried to see what is causing this but was unsuccessful in my review.
I have a second routine that basically copies all the data from one worksheet to another then re-saves the file under the original name. After running this “Repair” sub, the “PmtMade” sub (and others) works great for awhile until it again begins to slow down. If I rerun the REPAIR, all is fine again for some time.
What I was thinking of is some way that if the original routine (PmtMade) takes more that X number of seconds, a message box would appear prompting the user to run the “Repair” routine to speed up the process.
So, my question – Is there some command that when “PmtMade” button is clicked after a specified time (say 10 seconds), will trigger some other code or message box ? I tried Application.OnTime but could not get that to work (I probably had something set wrong).
Thanks for viewing,
Steve K.