Private Sub CommandButton1_Click()
Dim LastRow As [B][COLOR=Blue]Range[/COLOR][/B]
[COLOR=Blue][B] For Each cellule In Range([C6], [C65536].End(xlUp))
Select Case cellule.Interior.ColorIndex
Case -4142 'pas de couleur
cellule.Offset(0, 0).Value = TextBox1.Text
cellule.Offset(0, 1).Value = TextBox2.Text
cellule.Offset(0, 2).Value = TextBox3.Text
cellule.Offset(0, 3).Value = TextBox4.Text
cellule.Offset(0, 5).Value = TextBox5.Text
End Select
Next[/B][/COLOR]
MsgBox "L'horaire est bien enregistré"
response = MsgBox("Un autre jour à renseigner?", _
vbYesNo)
If response = vbYes Then
TextBox1.Text = TextBox1.Text
TextBox2.Text = TextBox2.Text
TextBox3.Text = TextBox3.Text
TextBox4.Text = TextBox4.Text
TextBox5.Text = TextBox5.Text
TextBox1.SetFocus
Else
Hide
End If
End Sub