Thread: Ontime function
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
macroapa macroapa is offline
external usenet poster
 
Posts: 14
Default Ontime function

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.