Private Sub UserForm_Initialize()
Dim i As Range
Dim plage As Variant
'Pour les Données pré-enregistrées des ComboBox...
With ThisWorkbook.Worksheets("Settings")
'Test-ref
plage = .Range(.Range("A2"), .Range("A500").End(xlUp))
Me.ComboBox1.List = plage
plage = .Range(.Range("B2"), .Range("B500").End(xlUp))
Me.ComboBox2.List = plage
plage = .Range(.Range("C2"), .Range("C500").End(xlUp))
Me.ComboBox3.List = plage
End With
'Récupère les données éventuelles de la feuille 2
Set i = Worksheets("DONNEES").Cells.Find(c)
If Not i Is Nothing Then
TextBox2.Value = i.Offset(0, 1)
ComboBox2.Value = i.Offset(0, 2)
TextBox8.Value = i.Offset(0, 3)
TextBox7.Value = i.Offset(0, 4)
ComboBox1.Value = i.Offset(0, 5)
ComboBox3.Value = i.Offset(0, 6)
TextBox3.Value = i.Offset(0, 7)
TextBox4.Value = i.Offset(0, 8)
TextBox5.Value = i.Offset(0, 9)
TextBox6.Value = i.Offset(0, 10)
TextBox9.Value = i.Offset(0, 11)
TextBox10.Value = i.Offset(0, 12)
End If
If TextBox10.Value <> vide And TextBox9.Value <> vide And TextBox6.Value <> vide Then
Label14 = TextBox10.Value / TextBox9.Value * 100
Label16 = TextBox10.Value / TextBox6.Value * 100
End If
End Sub