#1   Report Post  
Posted to microsoft.public.excel.programming
tj tj is offline
external usenet poster
 
Posts: 6
Default Timer

Hello,

I was wondering how I could set an internal time process
into a macro. Such as how long the macro has been running.

My thought is to display a progress bar that will show the
macros percentage of completion. From a response I
received yesterday (Thank You), I would like to use
something similar to what is on the site http://www.j-
walk.com/ss/excel/tips/tip34.htm.

My only problem is determining how the percentage is
calculated - my thought is to test how long the macro
takes to run - then write that time into my code -
subtracting that time from the amount of time the macro
has been running. But how could I setup this internal
timer?

Any alternative suggestions would also be greatly
appreciated.

Thank You!




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Timer

Hi TJ -

There's a VBA function called Timer which returns number of seconds since
midnight. You could call this once at the beginning of the function to save
the initial value, than call it periodically later to calculate number of
seconds elapsed since the start.

Mark

"TJ" wrote in message
...
Hello,

I was wondering how I could set an internal time process
into a macro. Such as how long the macro has been running.

My thought is to display a progress bar that will show the
macros percentage of completion. From a response I
received yesterday (Thank You), I would like to use
something similar to what is on the site http://www.j-
walk.com/ss/excel/tips/tip34.htm.

My only problem is determining how the percentage is
calculated - my thought is to test how long the macro
takes to run - then write that time into my code -
subtracting that time from the amount of time the macro
has been running. But how could I setup this internal
timer?

Any alternative suggestions would also be greatly
appreciated.

Thank You!






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
Lap-timer kabildgaard Excel Discussion (Misc queries) 0 August 11th 06 03:26 PM
Stopping a Timer / Running a timer simultaneously on Excel Paul23 Excel Discussion (Misc queries) 1 March 10th 06 12:08 PM
Timer Steve R[_2_] Excel Programming 3 December 5th 03 07:54 PM
Timer Don Lloyd Excel Programming 0 October 18th 03 03:40 AM
Timer Don Lloyd Excel Programming 2 October 17th 03 12:33 PM


All times are GMT +1. The time now is 09:14 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"