M
macroapa
Hi,
I have some code that I want to run every 30 seconds and have the
following:
Application.OnTime Now + TimeValue("00:00:30"), "dowerefresh"
However, what I want is a button to be able to switch it on and off.
I have a public boolean called autorefresh
I was going to do a loop while autorefersh = true, but i'm concerned
that this will just start multiple onTime events?
What is the best way to achieve this?
Thanks for any help.
I have some code that I want to run every 30 seconds and have the
following:
Application.OnTime Now + TimeValue("00:00:30"), "dowerefresh"
However, what I want is a button to be able to switch it on and off.
I have a public boolean called autorefresh
I was going to do a loop while autorefersh = true, but i'm concerned
that this will just start multiple onTime events?
What is the best way to achieve this?
Thanks for any help.