T
Tcs
I'd like to display the elapsed time my routine takes (it's big and takes quite
a while). I can capture the start and stop times, but when I computer the
elapsed time, all I get is something like "-2.31481481481555E-04". Does anyone
know what shananigans I need to go thru to get what I'm after? Do I have to
work with the hours, minutes and seconds separately?
Since I composed the above question, I have found the following:
Dim strDisplayTime As String
strDisplayTime = TotalTime \ 60 & ":" & Format(TotalTime Mod 60,
"00")
which I tweaked for my use:
StopTime = Time
ElapsedTime = StartTime - StopTime
strElapsedTime = ElapsedTime \ 60 & ":" & Format(ElapsedTime Mod 60, "00")
MsgBox _
"Stop Time.....(" & StopTime & ")" & vbCrLf & vbCrLf & _
"Start Time.....(" & StartTime & ")" & vbCrLf & vbCrLf & _
" ---------------" & vbCrLf & vbCrLf & _
"Elapsed Time.....(" & strElapsedTime & ")", , "TimeStamp - " & _
Date & " - " & Time
The formatting is okay, I'm now getting "0:00", But even though the elapsed
time is several minutes, all I still get is "0:00". (My elapsed time is very
short right now as I'm still testing.)
Can anyone please help?
Thanks in advance,
Tom
a while). I can capture the start and stop times, but when I computer the
elapsed time, all I get is something like "-2.31481481481555E-04". Does anyone
know what shananigans I need to go thru to get what I'm after? Do I have to
work with the hours, minutes and seconds separately?
Since I composed the above question, I have found the following:
Dim strDisplayTime As String
strDisplayTime = TotalTime \ 60 & ":" & Format(TotalTime Mod 60,
"00")
which I tweaked for my use:
StopTime = Time
ElapsedTime = StartTime - StopTime
strElapsedTime = ElapsedTime \ 60 & ":" & Format(ElapsedTime Mod 60, "00")
MsgBox _
"Stop Time.....(" & StopTime & ")" & vbCrLf & vbCrLf & _
"Start Time.....(" & StartTime & ")" & vbCrLf & vbCrLf & _
" ---------------" & vbCrLf & vbCrLf & _
"Elapsed Time.....(" & strElapsedTime & ")", , "TimeStamp - " & _
Date & " - " & Time
The formatting is okay, I'm now getting "0:00", But even though the elapsed
time is several minutes, all I still get is "0:00". (My elapsed time is very
short right now as I'm still testing.)
Can anyone please help?
Thanks in advance,
Tom