ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Program timing (https://www.excelbanter.com/excel-programming/280476-program-timing.html)

Christof DB

Program timing
 
Hi,

A common problem: I've steadily added code up till the
moment it takes about 2 seconds to run a particular sub.
In order to improve that, I'd like to do some timing of
routines, however, the only possible timing I found is
per second, which does not help me.
Q1:
Is there a way to get a time indication in smaller units
that seconds?
(don't tell me I should run the macro repeatively because
this is not a valid option in this particular case)

Q2: is there anything else I can do to speed up the code
(screenupdate & calculation are off already)

Thanks a lot
Christof

J.E. McGimpsey

Program timing
 
Take a look at Timer in XL Help.

For other speedups, it's hard to tell without seeing your code.

In article ,
"Christof DB" wrote:

Hi,

A common problem: I've steadily added code up till the
moment it takes about 2 seconds to run a particular sub.
In order to improve that, I'd like to do some timing of
routines, however, the only possible timing I found is
per second, which does not help me.
Q1:
Is there a way to get a time indication in smaller units
that seconds?
(don't tell me I should run the macro repeatively because
this is not a valid option in this particular case)

Q2: is there anything else I can do to speed up the code
(screenupdate & calculation are off already)

Thanks a lot
Christof


[email protected]

Program timing
 
Here's an article on the use of timers with resolution less than one
second.

http://support.microsoft.com/default...b;EN-US;172338

Charles Williams has a download that wraps Windows API high resolution
timers. Search page for 'High Resolution Timers: Timers.ZIP'.

http://www.decisionmodels.com/downloads.htm

HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------
Hi,

A common problem: I've steadily added code up till the
moment it takes about 2 seconds to run a particular sub.
In order to improve that, I'd like to do some timing of
routines, however, the only possible timing I found is
per second, which does not help me.
Q1:
Is there a way to get a time indication in smaller units
that seconds?
(don't tell me I should run the macro repeatively because
this is not a valid option in this particular case)

Q2: is there anything else I can do to speed up the code
(screenupdate & calculation are off already)

Thanks a lot
Christof



Chrsitof DB

Program timing
 
Very helpfull

Thanks to both of you

Christof


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com