\ is integer division, so 7600 \ 1000 = 7
/ is normal division, so 7600 / 1000 = 7.6
the format function performs rounding, so you end up with 8 instead of 7.
your function won't work for a couple of reasons (try putting in 77600 for example). Try this:VB Code:
Private Function ConvertMilliSeconds(ByVal mSec As Long) As String ConvertMilliSeconds = Format$(mSec \ 3600000, "00") & ":" & _ Format$((mSec Mod 3600000) \ 60000, "00") & ":" & _ Format$((mSec Mod 60000) / 1000, "00.000") End Function




Reply With Quote