LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 201
Default Elapsed time to run code

Excel 2002, WinXP
I have the following code to give me the elapsed time for a macro to run.

Time1 = Time
'My code
Time2 = Time
MsgBox Time1 & " " & Time2
MsgBox Format(Time2 - Time1, "00:00:00")

The first MsgBox gives me 2 times that are some 17 seconds apart. That's
accurate.
The second MsgBox shows 00:00:00 no matter what.

What is wrong with the second MsgBox line?

Thanks for all your help. Otto


 
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
Elapsed Time KevinT Excel Worksheet Functions 9 July 2nd 08 08:27 AM
Calculate Ending time using Start Time and Elapsed Time Chief 711 Excel Worksheet Functions 5 May 13th 08 04:34 PM
Elapsed time LtFass Excel Discussion (Misc queries) 3 November 10th 07 11:45 PM
Need Elapsed Time Help Jwy Excel Worksheet Functions 2 September 29th 05 03:54 AM
Elapsed Time Random Excel Programming 4 September 5th 03 01:18 PM


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