RowSource automatisé
Fermé
Val2202
-
29 avril 2010 à 20:35
Polux31 Messages postés 6917 Date d'inscription mardi 25 septembre 2007 Statut Membre Dernière intervention 1 novembre 2016 - 1 mai 2010 à 14:07
Polux31 Messages postés 6917 Date d'inscription mardi 25 septembre 2007 Statut Membre Dernière intervention 1 novembre 2016 - 1 mai 2010 à 14:07
1 réponse
Polux31
Messages postés
6917
Date d'inscription
mardi 25 septembre 2007
Statut
Membre
Dernière intervention
1 novembre 2016
1 196
1 mai 2010 à 14:07
1 mai 2010 à 14:07
Bonjour,
Sur la feuille 1 du fichier :
Dans la colonne A = pays
Dans la colonne B = villes
Sur le formulaire :
Combo1 = Pays
Combo2 = Villes
;o)
Sur la feuille 1 du fichier :
Dans la colonne A = pays
Dans la colonne B = villes
Sur le formulaire :
Combo1 = Pays
Combo2 = Villes
Private Sub Combo1_Change()
Dim ws As Worksheet
Dim lig As Long
Set ws = Worksheets(1)
lig = 2
Combo2.Clear
With ws
While .Range("A" & lig).Value <> ""
If .Range("A" & lig).Value = Combo1.Text Then
Combo2.AddItem .Range("B" & lig).Value
End If
lig = lig + 1
Wend
End With
Set ws = Nothing
End Sub
;o)