' PEGA ESSA FUNÇÃO QIE FIZ...
Public Function fSomaHora(ByVal pH1 As String, ByVal pH2 As String) As String
On Error Resume Next
Dim SomaHoras, Hora1, Hora2, TotalHoras, TotalMinutos
Dim SomaDias As Integer
Hora1 = CDate(pH1)
Hora2 = CDate(pH2)
SomaHoras = Format$((CDate(CDate(Hora2) - CDate(Hora1))), "hh:mm")
TotalHoras = Mid(SomaHoras, 1, 2)
TotalMinutos = Mid(SomaHoras, 4, 5)
SomaDias = DateDiff("d", a, b)
fSomaHora = Format$(TotalHoras + (SomaDias * 24), "00") & ":" & Format$(TotalMinutos, "00")
Hora1 = ""
Hora2 = ""
SomaHoras = ""
TotalHoras = ""
TotalMinutos = ""
SomaDias = 0
SomaDias = DateDiff("d", a, b)
End Function
'******** PARA USAR USE ISSO AI ****************
Dim a, b
Dim X As Double
Dim HoraI, HoraF
' USE ARRAYS PARA FACILITAR dt(?).text
HoraI = dt.(14)Text & ":" & dt(15).Text
HoraF = dt(16).Text & ":" & dt(17).Text
a = dt(26).Text & "/" & dt(27).Text & "/" & dt(28).Text
b = dt(29).Text & "/" & dt(30).Text & "/" & dt(31).Text
lbldt(5).Caption = fSomaHora(HoraI, HoraF)
HoraI = ""
HoraF = ""
a = ""
b = ""
ESPERO TER AJUDADO
Fuuuuuuuuuuuuuiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii