ich möchte in der Textbox3 ,die Zeitdifferenz zwischen Textbox1 und Tetbox2 anzeigen lassen.. bekomme es leider nicht hin.
CDate("16:30") - CDate("8:17")ergibt 0,342361111111111
CDate(CDate("16:30") - CDate("8:17"))ergibt 08:13:00
Sub Unit()
If IsDate(Cells(1, 1).Text) And IsDate(Cells(2, 1).Text) Then
If CDate(Cells(2, 1).Text) CDate(Cells(1, 1).Text) Then
Cells(3, 1) = CStr(1 + CDate(Cells(2, 1).Text) - CDate(Cells(1, 1).Text))
Else
Cells(3, 1) = CStr(CDate(Cells(2, 1).Text) - CDate(Cells(1, 1).Text))
End If
End If
End Sub
Gruß Gerd