Public Class Form1 Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim hrs, mins, secs, totalsec, totalmin As Integer totalsec = CInt(TextBox1.Text) 'the number from the input (could use 2549 as well) secs = totalsec Mod 60 'seconds calculated totalmin = totalsec \ 60 'total minutes (as if there were no hours) calculated mins = totalmin Mod 60 'minutes calculated hrs = totalmin \ 60 'hours calculated MessageBox.Show("H:" & CStr(hrs) & " M:" & CStr(mins) & " S:" & CStr(secs)) End Sub End Class