Declare Function StrFromTimeInterval _
Lib "shlwapi" Alias "StrFromTimeIntervalA" ( _
ByVal pszOut As String, _
ByVal cchMax As Long, _
ByVal dwTimeMS As Long, _
ByVal dwDigits As Long) As Long
Функция возвращает число символов в pszOut, включая завершающий нулевой символ
Private Function GetFormattedTime(ByVal lTime As Long, Optional lDigits As Long = 4) As String Dim StrOut As String StrOut = Space(64) Call StrFromTimeInterval(StrOut, Len(StrOut) - 1, lTime, lDigits) GetFormattedTime = Trim(StrOut) End Function Print GetFormattedTime(Text1.Text, 2)