XL 2016 Boucle espacé de 3 colonnes

poussy67

XLDnaute Occasionnel
Bonjour Le forum

Je cherche un moyen de simplifier un code Boucle sans succès. Faire une simple boucle pas de souci,
mais de faire une boucle qui me remplit la cellule espacer de 3 colonnes que je n'arrive pas à résoudre.
Je fais appel au pro d'excel pour un petit coup de pouce.

Les colonnes concernés sont D-G-J-M-P-S-V-Y-AB-AE-AH-AK

With Sheets("Cash")
Sheets("Cash").Cells(ComboBoxNom.ListIndex + 2, 4).Value = ComboBox1
Sheets("Cash").Cells(ComboBoxNom.ListIndex + 2, 7).Value = ComboBox2
Sheets("Cash").Cells(ComboBoxNom.ListIndex + 2, 10).Value = ComboBox3
Sheets("Cash").Cells(ComboBoxNom.ListIndex + 2, 13).Value = ComboBox4
Sheets("Cash").Cells(ComboBoxNom.ListIndex + 2, 16).Value = ComboBox5
Sheets("Cash").Cells(ComboBoxNom.ListIndex + 2, 19).Value = ComboBox6
Sheets("Cash").Cells(ComboBoxNom.ListIndex + 2, 22).Value = ComboBox7
Sheets("Cash").Cells(ComboBoxNom.ListIndex + 2, 25).Value = ComboBox8
Sheets("Cash").Cells(ComboBoxNom.ListIndex + 2, 28).Value = ComboBox9
Sheets("Cash").Cells(ComboBoxNom.ListIndex + 2, 31).Value = ComboBox10
Sheets("Cash").Cells(ComboBoxNom.ListIndex + 2, 34).Value = ComboBox11
Sheets("Cash").Cells(ComboBoxNom.ListIndex + 2, 37).Value = ComboBox12
End With

J'ai essayer ce ci sans succès

For i = 1 To 12
Sheets("Cash").Cells(ComboBoxNom.ListIndex + 2, i + 3) = Me.Controls("ComboBox" & i)
Next i

En vous remerciant d'avance.

Cdt
 

Discussions similaires

Réponses
3
Affichages
569

Statistiques des forums

Discussions
312 104
Messages
2 085 345
Membres
102 868
dernier inscrit
JJV