guy72
XLDnaute Impliqué
Bonjour et bonne année à tous,
J'ai un UserForm avec :
En TextBox1 = Un titre.
En TextBox2 = Le temps.
Et ça 27 fois.
Est-il possible d'avoir une TextBox59 sur (le UserForm) avec le total du temps au fur et à mesure que je saisi le temps des TextBox2,+4,+6,+8.....etc .
Est-ce possible 😕
Merci de votre aide.
Voici, le code actuel pour que cela soit plus clair.
'Code du UserForm5
Private Sub CommandButton1_Click()
ENCODER
End Sub
'Code du module3
Sub ENCODER()
Application.ScreenUpdating = False
mot = UserForm5.Label34
For feuille = 3 To Sheets.Count
Sheets(feuille).Activate
Set Cherche = Cells.Find(What:=mot, lookat:=xlWhole)
If Not Cherche Is Nothing Then
Cherche.Activate
With ActiveCell
If UserForm5.TextBox1 <> "" Then
.Offset(2, 1) = UserForm5.Label2.Caption
.Offset(2, 2) = UserForm5.TextBox1.Value
.Offset(2, 3) = "0:" & UserForm5.TextBox2.Value
.Offset(2, 3).NumberFormat = "mm:ss"
End If
If UserForm5.TextBox3 <> "" Then
.Offset(3, 1) = UserForm5.Label3.Caption
.Offset(3, 2) = UserForm5.TextBox3.Value
.Offset(3, 3) = "0:" & UserForm5.TextBox4.Value
.Offset(3, 3).NumberFormat = "mm:ss"
et ainsi de suite j'usqu'à 27.......suite
.Offset(28, 3).End(xlUp)(3).NumberFormat = "h:mm:ss"
.Offset(28, 3).End(xlUp)(3).Value = WorksheetFunction.Sum(Range(ActiveCell.Offset(2, 3), ActiveCell.Offset(32, 3).End(xlUp)))
End With
End If
Next feuille
Sheets(2).Activate
Unload UserForm5
Application.ScreenUpdating = True
End Sub
J'ai un UserForm avec :
En TextBox1 = Un titre.
En TextBox2 = Le temps.
Et ça 27 fois.
Est-il possible d'avoir une TextBox59 sur (le UserForm) avec le total du temps au fur et à mesure que je saisi le temps des TextBox2,+4,+6,+8.....etc .
Est-ce possible 😕
Merci de votre aide.
Voici, le code actuel pour que cela soit plus clair.
'Code du UserForm5
Private Sub CommandButton1_Click()
ENCODER
End Sub
'Code du module3
Sub ENCODER()
Application.ScreenUpdating = False
mot = UserForm5.Label34
For feuille = 3 To Sheets.Count
Sheets(feuille).Activate
Set Cherche = Cells.Find(What:=mot, lookat:=xlWhole)
If Not Cherche Is Nothing Then
Cherche.Activate
With ActiveCell
If UserForm5.TextBox1 <> "" Then
.Offset(2, 1) = UserForm5.Label2.Caption
.Offset(2, 2) = UserForm5.TextBox1.Value
.Offset(2, 3) = "0:" & UserForm5.TextBox2.Value
.Offset(2, 3).NumberFormat = "mm:ss"
End If
If UserForm5.TextBox3 <> "" Then
.Offset(3, 1) = UserForm5.Label3.Caption
.Offset(3, 2) = UserForm5.TextBox3.Value
.Offset(3, 3) = "0:" & UserForm5.TextBox4.Value
.Offset(3, 3).NumberFormat = "mm:ss"
et ainsi de suite j'usqu'à 27.......suite
.Offset(28, 3).End(xlUp)(3).NumberFormat = "h:mm:ss"
.Offset(28, 3).End(xlUp)(3).Value = WorksheetFunction.Sum(Range(ActiveCell.Offset(2, 3), ActiveCell.Offset(32, 3).End(xlUp)))
End With
End If
Next feuille
Sheets(2).Activate
Unload UserForm5
Application.ScreenUpdating = True
End Sub