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

Any way to have the time it takes to run a procedure
appear somewhere? Perhaps on the status bar?

Start = Timer
Finish = Timer
Application.StatusBar = TotalTime = Finish - Start




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


Try this:

Dim Start As Date, Finish As Date

Start = Now
' Procedure
Finish = Now
Application.StatusBar = "Time taken=" & Format((finish -
Start), "ss")

HTH
Helen
  #3   Report Post  
Posted to microsoft.public.excel.programming
sr sr is offline
external usenet poster
 
Posts: 2
Default Timer

Thanks for the response. Unfortunately, I get a syntax
error for the code for the last line below..........


Dim Start As Date, Finish As Date
Start = Now

Range("br3").Select
Application.ScreenUpdating = False
While ActiveCell < ""

If ActiveCell + ActiveCell.Offset(0, 1) < 1 Then
ActiveCell.EntireRow.Delete
ActiveCell.Offset(-1, 0).Select
End If
ActiveCell.Offset(1, 0).Select
Wend
Application.ScreenUpdating = True
Finish = Now

************Syntax Error***********
Application.StatusBar = "Time taken=" & Format((Finish -
Start), "ss")



End Sub





-----Original Message-----

Try this:

Dim Start As Date, Finish As Date

Start = Now
' Procedure
Finish = Now
Application.StatusBar = "Time taken=" & Format((finish -
Start), "ss")

HTH
Helen
.

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

sr

The syntax is correct. The two lines under your error should be one line.
They probably got wrapped in the message.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"sr" wrote in message
...
Thanks for the response. Unfortunately, I get a syntax
error for the code for the last line below..........


Dim Start As Date, Finish As Date
Start = Now

Range("br3").Select
Application.ScreenUpdating = False
While ActiveCell < ""

If ActiveCell + ActiveCell.Offset(0, 1) < 1 Then
ActiveCell.EntireRow.Delete
ActiveCell.Offset(-1, 0).Select
End If
ActiveCell.Offset(1, 0).Select
Wend
Application.ScreenUpdating = True
Finish = Now

************Syntax Error***********
Application.StatusBar = "Time taken=" & Format((Finish -
Start), "ss")



End Sub





-----Original Message-----

Try this:

Dim Start As Date, Finish As Date

Start = Now
' Procedure
Finish = Now
Application.StatusBar = "Time taken=" & Format((finish -
Start), "ss")

HTH
Helen
.



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
TIMER Jase Excel Discussion (Misc queries) 1 September 8th 08 10:22 PM
Timer Brandon H Excel Discussion (Misc queries) 5 August 9th 07 01:54 PM
Timer Vijay Excel Worksheet Functions 1 April 6th 07 11:00 AM
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


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