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
   | Private Sub UserForm_Initialize()
    'Définit la feuille contenant les données
    Set Ws = Worksheets("Listes")
    'Définit le nombre de lignes dans la colonne A
    NbLignes = Ws.Range("A1000").End(xlUp).Row
    'Remplissage du ComboBox1
    Alim_Combo 1
    Me.ComboBox1 = ActiveSheet.Name
    ComboBox1_Change
    On Error Resume Next
    Me.ComboBox2.ListIndex = 0
End Sub
 
Private Sub ComboBox1_Change()
    'Remplissage Combo2
    Alim_Combo 2, ComboBox1.Value
    ComboBox2_Change
    On Error Resume Next
    Me.ComboBox2.ListIndex = 0
End Sub
 
Private Sub ComboBox2_Change()
    'Remplissage Combo3
    Alim_Combo 3, ComboBox2.Value
    On Error Resume Next
    Me.ComboBox3.ListIndex = 0
End Sub | 
Partager