bonjour
Merci à l'avance pour votre aide, et j'attends votre réponse
si les heures et sup a 24H donne 00:00
Si tu peux me corrige le code suivant
Option Explicit
Private Sub CommandButton1_Click()
Dim i&, fin&
If modif Then
With Feuil2
For i = 1 To 14
.Cells(lign, i) = Controls("Textbox" & i): Controls("Textbox" & i) = ""
Next i
End With
Unload Me: GoTo 1
End If
If TextBox1 <> "" And TextBox2 <> "" And TextBox3 <> "" And TextBox4 <> "" Or TextBox5 <> "" And TextBox6 <> "" Then
With Feuil2
fin = .Range("A" & Rows.Count).End(xlUp).Row + 1
For i = 1 To 14
.Cells(fin, i) = Controls("Textbox" & i): Controls("Textbox" & i) = ""
If i = 13 Then
.Cells(lign, i).FormulaR1C1 = "=RC[-3]-RC[-2]+RC[-1]"
Me.TextBox13 = Sheets("Feuil2").Cells(lign, i)
End If
Next i
End With
Else
MsgBox "Veuillez remplir au minimum les éléments suivants : Nom, Prénom", , "Manque de données": Exit Sub
1 End If
Call Classer
'Unload Me
If modif Then
rech = UserForm1.TextBox1: Unload UserForm1: UserForm1.TextBox1 = rech: UserForm1.Show:
End If
modif = 0
End Sub
Private Sub UserForm_Initialize()
Dim i&
With Feuil2
For i = 1 To 14
Controls("Label" & i) = .Cells(1, i)
Next i
End With
End Sub
merci
je bloque ici
If i = 13 Then
.Cells(lign, i).FormulaR1C1 = "=RC[-3]-RC[-2]+RC[-1]"
Me.TextBox13 = Sheets("Feuil2").Cells(lign, i)
End If