je n'ai toujours pas le retour à la ligne
voila le code complet
si tu peux corriger
Private Sub CommandButton1_Click()
Dim ligne As Byte
Dim i As Byte
Select Case ListBox1.ListIndex 'suivant l'index de la sélection ds la listbox
Case -1: Exit Sub 'soit on sort
Case 0: ligne = 8 'soit on affecte à la variable cellule la cellule de desti
Case 1: ligne = 20
Case 2: ligne = 32
Case 3: ligne = 44
Case 4: ligne = 56
Case 5: ligne = 68
End Select
For i = ligne To ligne + 6
If Cells(i, 22) = '' Then
Cells(i, 2) = Calendar1
Cells(i, 3) = ListBox3 'clients
Cells(i, 4) = TextBox1 'hres jour
Cells(i, 5) = TextBox2 'hres nuit
Cells(i, 7) = CheckBox1 'petit déjeuner
Cells(i, 9) = checbox2 'repas midi
Cells(i, 11) = CheckBox3 'repas soir
Cells(i, 14) = OptionButton1 '1/2journée
Cells(1, 15) = OptionButton2 'journée
Cells(i, 16) = OptionButton3 'nuit
Cells(1, 15) = OptionButton2 'journée
Cells(i, 12) = TextBox3 'grand déplacement
Cells(i, 21) = TextBox5 'trajets jour
Cells(i, 22) = TextBox6 'trajets nuit
Exit Sub
End If
Next i
'recevoir les informations mensuelles
TextBox11 = Range('c81') 'controle frais
TextBox10 = Range('h79') 'h 25%
TextBox9 = Range('h80') ' h50%
TextBox7 = Range('d80') '200%
TextBox8 = Range('d79') '100%
TextBox12 = Range('c82') 'trajets
TextBox13 = Range('h3') 'affichage mois
End Sub
Private Sub CommandButton2_Click()
UserForm1.Hide
End Sub
Private Sub CommandButton3_Click() 'pour effacer les données
ListBox3.Value = ''
TextBox1.Value = ''
TextBox2.Value = ''
TextBox3.Value = ''
CheckBox1.Value = ''
CheckBox2.Value = ''
CheckBox3.Value = ''
TextBox5.Value = ''
TextBox6.Value = ''
End Sub
Private Sub ListBox1_Click()
End Sub
Private Sub ListBox2_Click()
Dim rep As Variant
With Me.ListBox2
Sheets(.ListIndex + 2).Select
End With
End Sub
Private Sub TextBox4_Change()
End Sub
Private Sub UserForm_Initialize()
For i = 1 To 6
ListBox1.AddItem 'semaine ' & i
Next i
Dim mafeuille As Worksheet
Dim x As Byte
Me.Caption = 'Saisie des données'
For Each mafeuille In ThisWorkbook.Worksheets
x = 1
If mafeuille.Index > 1 Then
Me.ListBox2.AddItem mafeuille.Name
End If
x = x + 1
Next
End Sub
Private Sub ListBox3_Click()
End Sub
Private Sub UserForm_Click()
End Sub