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 28 29 30 31 32 33 34 35 36 37 38 39
| Private Sub CommandButton1_Click()
With Worksheets(1)
derlign = .Range("a65536").End(xlUp).Row + 1
.Cells(derlign, 1).Value = TextBox1
.Cells(derlign, 2).Value = TextBox2
.Cells(derlign, 3).Value = TextBox3
.Cells(derlign, 4).Value = TextBox4
.Cells(derlign, 5).Value = ComboBox1
.Cells(derlign, 6).Value = ComboBox2
.Cells(derlign, 7).Value = ComboBox3
.Cells(derlign, 8).Value = TextBox5
.Cells(derlign, 9).Value = TextBox6
.Cells(derlign, 10).Value = TextBox7
.Cells(derlign, 11).Value = TextBox8
.Cells(derlign, 12).Value = TextBox9
.Cells(derlign, 13).Value = ComboBox5
.Cells(derlign, 14).Value = ComboBox4
.Cells(derlign, 15).Value = TextBox10
.Cells(derlign, 16).Value = TextBox11
.Cells(derlign, 17).Value = ComboBox8
.Cells(derlign, 18).Value = TextBox12
.Cells(derlign, 19).Value = IIf(CheckBox1, -1 * CheckBox1, "")
.Cells(derlign, 20).Value = IIf(CheckBox2, -1 * CheckBox2, "")
.Cells(derlign, 21).Value = IIf(CheckBox3, -1 * CheckBox3, "")
.Cells(derlign, 22).Value = IIf(CheckBox4, -1 * CheckBox4, "")
.Cells(derlign, 23).Value = IIf(CheckBox5, -1 * CheckBox5, "")
.Cells(derlign, 24).Value = IIf(CheckBox6, -1 * CheckBox6, "")
.Cells(derlign, 25).Value = IIf(CheckBox7, -1 * CheckBox7, "")
.Cells(derlign, 26).Value = TextBox13
.Cells(derlign, 27).Value = ComboBox6
.Cells(derlign, 28).Value = TextBox14
.Cells(derlign, 29).Value = TextBox15
End With
Select Case MsgBox("La quantité de produit non-conforme que vous avez saisie concerne t'elle uniquement ce produit ?", vbYesNo + vbQuestion, "Attention")
Case vbYes
Case vbNo
UserForm2.Show
End Select
End Sub |
Partager