XL 2016 intégration de colonne

Lemidi34

XLDnaute Occasionnel
Bonjour,

ce script me permet de rentrer des textbox dans des lignes au fur et à mesure en partant du haut vers le bas

Dim i As Integer
i = Range("a100").End(xlUp).Row + 1
Range("a" & i) = TextBox1
Range("b" & i) = UCase(TextBox2)
Range("c" & i) = ComboBox1
Range("d" & i) = TextBox3
Range("E" & i) = TextBox4
Range("F" & i) = TextBox5
TextBox1 = " "
TextBox2 = " "
ComboBox1 = " "
TextBox3 = " "
TextBox4 = " "
TextBox5 = " "
End Sub

Je souhaite savoir si la formule existe pour rentrer par colonne de gauche à droite au lieu de ligne haut en bas

Merci de votre aide
 

Fred0o

XLDnaute Barbatruc
Bonjour lemidi34

Code modifie a adapter a ton contexte et a tester

VB:
Sub Test()
    Dim i As Integer
    i = Range("XFD10").End(xlToLeft).Column + 1
    Cells(10, i) = TextBox1
    Cells(10, i + 1) = UCase(TextBox2)
    Cells(10, i + 2) = ComboBox1
    Cells(10, i + 3) = TextBox3
    Cells(10, i + 4) = TextBox4
    Cells(10, i + 5) = TextBox5
    TextBox1 = " "
    TextBox2 = " "
    ComboBox1 = " "
    TextBox3 = " "
    TextBox4 = " "
    TextBox5 = " "
End Sub
 

Discussions similaires

Réponses
6
Affichages
202

Statistiques des forums

Discussions
311 725
Messages
2 081 949
Membres
101 852
dernier inscrit
dthi16088