1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| Private Sub Ok_Click()
Sheets("fichier-type_avoir").Rows("3:3").Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
If Me.CheckBox1.Value = True Then Sheets("fichier-type_avoir").Cells(3, 2) = 1 Else Sheets("fichier-type_avoir").Cells(3, 2) = 0
End Sub
Private Sub UserForm_Initialize()
'Me.comboLifetime.List = Sheets("Congig").Range("D2: D20")
'OU
'For i = 1 To 10
' Me.comboLifetime.AddItem i
' If comboLifetime.List(comboLifetime.ListCount) = Sheets("fichier-type_avoir").Cells(3, 1) Then Me.comboLifetime.ListIndex = i
'Next
'Dim R As Range
'Set R = Sheets("Congig").Range("D2: D20")
'For i = 1 To R.Rows.Count
' Me.comboLifetime.AddItem i
' If R(i, 1) = Sheets("fichier-type_avoir").Cells(3, 1) Then Me.comboLifetime.ListIndex = i
'Next
Me.CheckBox1.Value = Sheets("fichier-type_avoir").Cells(3, 2)
Me.CheckBox2.Value = Sheets("fichier-type_avoir").Cells(3, 3)
End Sub |