Rick@
XLDnaute Occasionnel
Bonjour,
J'ai ajouté à ma macro (qui fonctionnait très bien) un deuxième choix de combo (3) et j'ai demandé un autre "range" (A88) mais voilà ce dernier domine sur le premier. Comment arriver à obtenir des "ranges" séparés selon le combo qui est activé?
Sub Copie()
If Feuil3.ComboBox2 = "Commercial" Then
Rows("120:124").Copy Rows("101:101")
Feuil3.Range("A1").Select
End If
If Feuil3.ComboBox2 = "Résidentiel" Then
Rows("126:130").Copy Rows("101:101")
Feuil3.Range("A1").Select
End If
If Feuil3.ComboBox2 = "Recouvrement" Then
Rows("132:136").Copy Rows("101:101")
Feuil3.Range("A1").Select
End If
If Feuil3.ComboBox3 = "COMM" Then
Rows("151:155").Copy Rows("143:143")
Feuil3.Range("A88").Select
End If
If Feuil3.ComboBox3 = "RÉS" Then
Rows("158:162").Copy Rows("143:143")
Feuil3.Range("A88").Select
End If
If Feuil3.ComboBox3 = "REC" Then
Rows("165:169").Copy Rows("143:143")
Feuil3.Range("A88").Select
End If
End Sub
Merci à l'avance!!!
J'ai ajouté à ma macro (qui fonctionnait très bien) un deuxième choix de combo (3) et j'ai demandé un autre "range" (A88) mais voilà ce dernier domine sur le premier. Comment arriver à obtenir des "ranges" séparés selon le combo qui est activé?
Sub Copie()
If Feuil3.ComboBox2 = "Commercial" Then
Rows("120:124").Copy Rows("101:101")
Feuil3.Range("A1").Select
End If
If Feuil3.ComboBox2 = "Résidentiel" Then
Rows("126:130").Copy Rows("101:101")
Feuil3.Range("A1").Select
End If
If Feuil3.ComboBox2 = "Recouvrement" Then
Rows("132:136").Copy Rows("101:101")
Feuil3.Range("A1").Select
End If
If Feuil3.ComboBox3 = "COMM" Then
Rows("151:155").Copy Rows("143:143")
Feuil3.Range("A88").Select
End If
If Feuil3.ComboBox3 = "RÉS" Then
Rows("158:162").Copy Rows("143:143")
Feuil3.Range("A88").Select
End If
If Feuil3.ComboBox3 = "REC" Then
Rows("165:169").Copy Rows("143:143")
Feuil3.Range("A88").Select
End If
End Sub
Merci à l'avance!!!