Private Sub titulaire_1_AfterUpdate()
Dim moisactu As Integer
moisactu = Month(Date)
Sheets("Liste projets").Select
If Me.Controls("titulaire_1") = ct_1 Then
Exit Sub
Else
For I = 1 To 5
If Me.Controls("label" & I) = ct_1 Then
x1 = CDate(heure_fin)
x2 = CDate(heure_debut)
'x3 = CDate(Controls("textbox" & j))
X = Controls("TextBox" & I)
x3 = TimeSerial(Split(X, ":")(0), Split(X, ":")(1), 0)
X = x3 + (x1 - x2)
'Y = Int(X) * 24
'Z = Format(X - Int(X), "Hh:mm")
'Controls("TextBox" & j).Value = Y + Split(Z, ":")(0) & ":" & Split(Z, ":")(1)
Controls("TextBox" & I).Value = X
y = Int(X) * 24
Z = Format(X - Int(X), "Hh:mm")
Controls("TextBox" & I).Value = y + Split(Z, ":")(0) & ":" & Split(Z, ":")(1)
Else
End If
Next I
For j = 1 To 5
If Me.Controls("titulaire_1") = (Cells(9, 11 + j)) Then
x1 = CDate(heure_fin)
x2 = CDate(heure_debut)
'x3 = CDate(Controls("textbox" & j))
X = Controls("TextBox" & j)
x3 = TimeSerial(Split(X, ":")(0), Split(X, ":")(1), 0)
X = x3 - (x1 - x2)
'Y = Int(X) * 24
'Z = Format(X - Int(X), "Hh:mm")
'Controls("TextBox" & j).Value = Y + Split(Z, ":")(0) & ":" & Split(Z, ":")(1)
Controls("TextBox" & j).Value = X
y = Int(X) * 24
Z = Format(X - Int(X), "Hh:mm")
Controls("TextBox" & j).Value = y + Split(Z, ":")(0) & ":" & Split(Z, ":")(1)
Else
End If
Next j
End If
ct_1 = Me.Controls("titulaire_1")
End Sub