1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| Private Sub commandbutton1_click()
Dim lign As Long
With Sheets("Feuil1")
lign = .Range("a" & Rows.Count).End(xlUp).Row + 1
.Cells(lign, 2) = (TextBox1.Value)
.Cells(lign, 1) = (TextBox2.Value)
.Cells(lign, 3) = (TextBox3.Value)
.Cells(lign, 6) = (ComboBox1.Value)
If CheckBox1.Value = True Then
.Cells(lign, 4) = ("SKF")
.Cells(lign, 5) = ("AMEX")
End If
If CheckBox2.Value = True Then
.Cells(lign, 4) = ("AMEX")
.Cells(lign, 5) = ("SKF")
End If
If CheckBox3.Value = True Then
.Cells(lign, 4) = (ComboBox2.Value)
.Cells(lign, 5) = (ComboBox3.Value)
End If
End With
Unload Me
End Sub |
Partager