1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| Private Sub CommandButton1_Click()
Dim i As Integer
Application.ScreenUpdating = False
Sheets("Rapport").Activate
If TextBox1 = "" Or TextBox2 = "" Or TextBox3 = "" Or TextBox4 = "" Or TextBox5 = "" Or TextBox6 = "" Or TextBox7 = "" Or TextBox8 = "" Or TextBox9 = "" Or TextBox10 = "" Then
MsgBox "Merci de remplir tous les champs requis"
Else
i = 11
Do While Cells(i, 1) <> ""
Cells(i, 1).Offset(1, 0).Select
i = i + 1
Loop
ActiveCell.Value = TextBox11.Value 'opérations
ActiveCell.Offset(0, 1) = Range("B2").Value 'fonction Maintenant() pour l'heure
ActiveCell.Offset(0, 3).Value = TextBox1.Value 'Caractéristique1
ActiveCell.Offset(0, 7).Value = TextBox2.Value 'Caractéristique2
ActiveCell.Offset(0, 10).Value = TextBox3.Value 'Caractéristique3
ActiveCell.Offset(0, 15).Value = TextBox4.Value 'Caractéristique4
ActiveCell.Offset(0, 20).Value = TextBox5.Value 'Caractéristique5
ActiveCell.Offset(0, 25).Value = TextBox6.Value 'Caractéristique6
ActiveCell.Offset(0, 26).Value = TextBox7.Value 'Caractéristique7
ActiveCell.Offset(0, 27).Value = TextBox8.Value 'Caractéristique8
ActiveCell.Offset(0, 28).Value = TextBox9.Value 'Caractéristique9
ActiveCell.Offset(0, 29).Value = TextBox10.Value 'Caractéristique10
End If
Application.ScreenUpdating = True
End Sub |
Partager