Answers for "Count time VBA"

VBA
1

Count time VBA

Sub Your_Code()
  Dim StartTime As Double
  Dim SecondsElapsed As Double

  'Remember time when macro starts
    StartTime = Timer

  '*****************************
  'Insert Your Code Here...
  '*****************************

  'Determine how many seconds code took to run
    SecondsElapsed = Round(Timer - StartTime, 2)

  'Notify user in seconds
    MsgBox "This code ran successfully in " & SecondsElapsed & " seconds", vbInformation
End sub
Posted by: Guest on July-28-2021

Code answers related to "VBA"

Browse Popular Code Answers by Language