Get time it takes to run program!!
Hi
Sorry about that. It works fine if you remove some of the dims like this.
Dim totaltime As Long
starttime = Now()
'Your code here
Endtime = Now()
totaltime = DateDiff("s", starttime, endtime)
'convert seconds into minutes and seconds to display
Mins = Int(totaltime \ 60)
Secs = totaltime Mod 60
Totaltimetaken = Mins & " Minute(s) and " & secs & " Seconds."
MsgBox(Totaltimetaken)
HTH
Ken
|