Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default OnTime function

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default OnTime function

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.

Max Potters wrote:

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


--

Dave Peterson

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default OnTime function

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
"Max Potters" wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default OnTime function

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.)



Max Potters wrote:

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
"Max Potters" wrote in message
...
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


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find %ontime & SUMIF ontime ie: find matching sets within Range... Chris T-M Excel Worksheet Functions 3 October 10th 08 08:14 PM
OnTime bug? Antonio Excel Discussion (Misc queries) 0 June 9th 06 08:24 PM
OnTime VB [email protected] Excel Worksheet Functions 2 May 16th 06 08:43 PM
OnTime...Please Help Michael_I Excel Programming 9 May 24th 04 07:56 PM
need a function (not macro with ontime) to record a snapshot of a changing cell Shannon Excel Programming 3 February 2nd 04 06:26 PM


All times are GMT +1. The time now is 02:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"