Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Setting the system clock with excel

Hi,

I run a macro in an infinite loop for logging purposes. The problem is that
this seems to slow down the system clock.

One of the variables I am logging is a reference to time set on an external
device. Is it possible to use this to reset the system clock periodically?

Many thanks.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default Setting the system clock with excel

Check out the Date and Time *statements* in VBA Help.

On Thu, 7 Aug 2003 08:52:56 +1200, "ccdubs" wrote:

Hi,

I run a macro in an infinite loop for logging purposes. The problem is that
this seems to slow down the system clock.

One of the variables I am logging is a reference to time set on an external
device. Is it possible to use this to reset the system clock periodically?

Many thanks.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Setting the system clock with excel

what about using the OnTime event rather than an infinite loop?

Guido

HoloGuides
http://hologuides.com/programming/ExcelVBA


"jaf" schrieb im Newsbeitrag
...
Hi,
Running a macro in an infinite loop will slow the system clock because
Windows isn't getting enough CPU cycles.
Do you use DoEvents in your loop?


--

John

johnf202 at hotmail dot com


"ccdubs" wrote in message
...
Tom,

The system clock only slows down when the macro is running, otherwise it
remains fairly accurate.

I too was surprised at this and as yet I am unable to explain it.

All the macro does is write data to a text file and would be easy enough

to
simulate if you are interested in trying it overnight on your own

computer.


"Tom Ogilvy" wrote in message
...
You really think his code may be slowing down the system clock?

Regards,
Tom Ogilvy


Myrna Larson wrote in message
...
Check out the Date and Time *statements* in VBA Help.

On Thu, 7 Aug 2003 08:52:56 +1200, "ccdubs"

wrote:

Hi,

I run a macro in an infinite loop for logging purposes. The

problem
is
that
this seems to slow down the system clock.

One of the variables I am logging is a reference to time set on an
external
device. Is it possible to use this to reset the system clock
periodically?

Many thanks.










  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Setting the system clock with excel

The "catch 22" is that I want as many cycles as possible and an accurate
time stamp.

I think I have resolved the issue (thanks to you all). The device that I am
reading data from has its own clock and I am using that clock as my time
stamp and I will also use it every hour or so to reset the system clock.
Just to keep things tidy.

Many thanks.

"Guido" wrote in message
...
what about using the OnTime event rather than an infinite loop?

Guido

HoloGuides
http://hologuides.com/programming/ExcelVBA


"jaf" schrieb im Newsbeitrag
...
Hi,
Running a macro in an infinite loop will slow the system clock because
Windows isn't getting enough CPU cycles.
Do you use DoEvents in your loop?


--

John

johnf202 at hotmail dot com


"ccdubs" wrote in message
...
Tom,

The system clock only slows down when the macro is running, otherwise

it
remains fairly accurate.

I too was surprised at this and as yet I am unable to explain it.

All the macro does is write data to a text file and would be easy

enough
to
simulate if you are interested in trying it overnight on your own

computer.


"Tom Ogilvy" wrote in message
...
You really think his code may be slowing down the system clock?

Regards,
Tom Ogilvy


Myrna Larson wrote in message
...
Check out the Date and Time *statements* in VBA Help.

On Thu, 7 Aug 2003 08:52:56 +1200, "ccdubs"

wrote:

Hi,

I run a macro in an infinite loop for logging purposes. The

problem
is
that
this seems to slow down the system clock.

One of the variables I am logging is a reference to time set on

an
external
device. Is it possible to use this to reset the system clock
periodically?

Many thanks.












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
Calculating a future date using system clock & time remaining Steve Chalom[_2_] Excel Worksheet Functions 1 November 5th 09 03:11 PM
How do I open an Excel file on XP system, saved on a Vista system JLS7 Excel Discussion (Misc queries) 3 December 2nd 08 04:21 AM
How do I calculate time in excel (clock in and clock out chad Excel Discussion (Misc queries) 3 January 7th 08 10:09 PM
Change EXCEL Clock to Standard Clock or Military Time YoMarie Excel Worksheet Functions 4 April 29th 07 08:39 PM
Calculating Total Number of Minutes in a Clock Setting Larry H Excel Discussion (Misc queries) 3 October 7th 05 11:25 PM


All times are GMT +1. The time now is 07:01 PM.

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

About Us

"It's about Microsoft Excel"