1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| Private Sub CommandButton1_Click()
deb = Replace(ComboBox1, ":", "h"): fi = Replace(ComboBox2, ":", "h"): col = ComboBox10.ListIndex + 2
If TypeName(ctrl) <> "commandbutton" And ctrl = "" Then
MsgBox "VOUS N'AVEZ PAS TOUT REMPLIE LE FORMULAIRE "
Exit Sub
End If
texte = ComboBox3 & vbCrLf & ComboBox9 & vbCrLf & TextBox2
With Sheets(semaine).Range("A8:A18")
With Sheets(ComboBox3).Range(Cells(.Find(deb, LookIn:=xlValues).Row, col), Cells(.Find(fi, LookIn:=xlValues).Row, col))
.MergeCells = True
.Borders.LineStyle = xlContinuous
.Interior.color = RGB(235, 235, 235)
.Value = texte
End With
End With
End Sub |
Partager