OnTime function

  • Thread starter Thread starter Max Potters
  • Start date Start date
M

Max Potters

Hi all,

I'm trying to use the OnTime function...here's the little code

application.onkey Now + TimeValue("00:00:01"), "mod1"

now the code works, but here's what i would like to get: I want the module
"mod1" to be run every second, but without it being stopped by the user who
might be busy. Now here's the strange thing..

On my Pc with WinXp Pro, the user can work in a sheet and the module runs
every second, no problem...
But when I try this on a WinME system, and I type in cells (or whatever
action I'm taking...) while the module should be running, it waits till I've
finished writing in cells...
Is this a setting,if so how to change this, or does someone else know a nice
way to let a piece of code run in the background every 1 second?

thanks in advance

max
 
You sure it's working in your WinXP system.

Try a little test. Try editting a cell--but do it very slowly.

I think you'll find that the macro is waiting for excel to become available in
that version of windows, too.
 
You are right Dave, it doesnt work on both operating systems...

Do you know a way to still run macro's every second, but without any breaks
caused by the user?

thanks
max
 
Nope. If the user is typing in a cell, useful macros won't run.

(I've seen someone (I forget who) post a macro that did something while the user
was typing in the formulabar, but it wasn't useful--more of a scholastic
exercise.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Ontime function 3
Cancel Ontime routine 3
ontime code 4
Ontime procedures 3
OnTime Change_Event macro AND copy to sheet2 macro trouble 7
Error using OnTime Method 3
OnTime method 1
Export Code Module 5

Back
Top