Bonjour, à tous
Je souhaiterais simplifier mon code en faisant une boucle for/next avec deux conditions sur les lignes ci dessous,mais je cale!!
Label1.Caption = Sheets("data").Range("a1").Text
Label2.Caption = Sheets("data").Range("b1").Text
Label3.Caption = Sheets("data").Range("c1").Text
......
je pensais faire un code du style mais ça fonctionne pas..
c = Sheets("data").Range("a1").End(xlRight).Column
For b = 1 To 3
Controls("label" & b).Caption = Sheets("data").Range(c & "1").Text
Next b
merci d'avance
Phil
Je souhaiterais simplifier mon code en faisant une boucle for/next avec deux conditions sur les lignes ci dessous,mais je cale!!
Label1.Caption = Sheets("data").Range("a1").Text
Label2.Caption = Sheets("data").Range("b1").Text
Label3.Caption = Sheets("data").Range("c1").Text
......
je pensais faire un code du style mais ça fonctionne pas..
c = Sheets("data").Range("a1").End(xlRight).Column
For b = 1 To 3
Controls("label" & b).Caption = Sheets("data").Range(c & "1").Text
Next b
merci d'avance
Phil