Private Function Conversion(Durée As Long) As String Dim Temps As Long, Heures As Integer, Minutes As Integer, Secondes As Integer Temps = Durée ' Temps en secondes Secondes = Temps Mod 60 Temps = (Temps - Secondes) \ 60 ' Temps en minutes Minutes = Temps Mod 60 Heures = (Temps - Minutes) \ 60Conversion Durée & " s " & Heures & " h " & Minutes & " min " & Secondes & " s" End Function
MsgBox Conversion(22200)