VisualBasic and a program to convert time
Hello,
I am studying Visual Basic on school. We open Excel and on programmer tab, under visual basic, we code.
Thing is, I'm stuck with this one, I need a program that converts time in seconds to time in format hours:minutes:seconds
Like, when I type 6, it converts to 00:00:06 or 3673 to 01:01:13.
Currently the code (it's wrong, I know) it's like this:
Kinda have no clue of what I am doing. So if anyone could give me the code to the working program so that I can study it.
Thanks in advance and sorry for bothering. I have a feeling this is not as complex as it seems to me, but I am kinda stuck.
I have other VB problems, so I'll leave this one to you. thanks once more.
I am studying Visual Basic on school. We open Excel and on programmer tab, under visual basic, we code.
Thing is, I'm stuck with this one, I need a program that converts time in seconds to time in format hours:minutes:seconds
Like, when I type 6, it converts to 00:00:06 or 3673 to 01:01:13.
Currently the code (it's wrong, I know) it's like this:
Code:
Public Sub ConversorTempo()
Dim z As Integer
z = Val(InputBox("Digite o número em segundos."))
MsgBox ("O tempo em horas, minutos e segundos é" & z / 3600 & "Horas " & (z / 3600) / 60 & "Minutos " & ((z / 3600) / 60) / z & "Segundos.")
End Sub
Thanks in advance and sorry for bothering. I have a feeling this is not as complex as it seems to me, but I am kinda stuck.
I have other VB problems, so I'll leave this one to you. thanks once more.

