Raccourcir un code

Bonjour,

Est ce que c'est possible d'allégé le code pour avoir moins de répétition,

.Cells(lfin + 1, 7).Value = ComboBox3.Value
    .Cells(lfin + 2, 7).Value = ComboBox3.Value
    .Cells(lfin + 3, 7).Value = ComboBox3.Value
    .Cells(lfin + 4, 7).Value = ComboBox3.Value
    .Cells(lfin + 5, 7).Value = ComboBox3.Value
    .Cells(lfin + 6, 7).Value = ComboBox3.Value
    .Cells(lfin + 7, 7).Value = ComboBox3.Value
    .Cells(lfin + 8, 7).Value = ComboBox3.Value
    .Cells(lfin + 9, 7).Value = ComboBox3.Value
    .Cells(lfin + 10, 7).Value = ComboBox3.Value

pour qu'il se fasse 30 fois,

ou si c'est possible tant que la cellule dans la colonne A est remplie

Bonjour,

Si tu as besoin d'une boucle de 30 ...

For i =1 to 30
    .Cells(lfin + i, 7).Value = ComboBox3.Value
Next i

Merci

De rien ...

Merci pour ton remerciement ...

Bonjour, bonjour !

Boucle inutile ‼ .Cells(lfin + 1, 7).Resize(30).Value = ComboBox3.Value

Rechercher des sujets similaires à "raccourcir code"