Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Public Function fMillis(lngVal As Long, stUnit As String) As Long
' This function allows you to quickly understand the time span
' involved, rather than having to enter the number of
' milliseconds or calculate how many seconds or minutes are
' represented by the millisecond value.
'
' You can type the complete time unit, or an abbreviation:
' Minutes, Minute, Min, M, Seconds, Second, Sec, S
' Examples: fMillis(10, "Seconds"), fMillis(5,"Minutes")
'
' If the clocking speed of your processor is different,
' you can change the constant cMilli to the number of ticks
' per second for your machine.
Dim secs As Long
Const cMilli As Long = 1000
stUnit = Left$(stUnit, 1)
Select Case stUnit
Case "M"
secs = lngVal * 60
Case "S"
secs = lngVal
Case Else
secs = 0
End Select
fMillis = secs * cMilli
End Function