Dennnisss
XLDnaute Occasionnel
Peut-on creer une boucle pour eliminer trop de ligne pour rien
je visualise bien une boucle pour les labels
for i = 1 to 25
sauf pour les offset qui se repeter je suis dans le vide
alors j'aurais besoin de votre aide svp
alors merci a la'avance
dennnisss
![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Private Sub UserForm_Initialize()
Dim Offset As Integer
With Feuil5
Label1.Caption = .Cells(20 + Offset, 1)
Label2.Caption = .Cells(21 + Offset, 1)
Label3.Caption = .Cells(22 + Offset, 1)
Label4.Caption = .Cells(23 + Offset, 1)
Label5.Caption = .Cells(24 + Offset, 1)
Label6.Caption = .Cells(20 + Offset, 4)
Label7.Caption = .Cells(21 + Offset, 4)
Label8.Caption = .Cells(22 + Offset, 4)
Label9.Caption = .Cells(23 + Offset, 4)
Label10.Caption = .Cells(24 + Offset, 4)
Label11.Caption = .Cells(20 + Offset, 7)
Label12.Caption = .Cells(21 + Offset, 7)
Label13.Caption = .Cells(22 + Offset, 7)
Label14.Caption = .Cells(23 + Offset, 7)
Label15.Caption = .Cells(24 + Offset, 7)
Label16.Caption = .Cells(20 + Offset, 10)
Label17.Caption = .Cells(21 + Offset, 10)
Label18.Caption = .Cells(22 + Offset, 10)
Label19.Caption = .Cells(23 + Offset, 10)
Label20.Caption = .Cells(24 + Offset, 10)
Label21.Caption = .Cells(20 + Offset, 13)
Label22.Caption = .Cells(21 + Offset, 13)
Label23.Caption = .Cells(22 + Offset, 13)
Label24.Caption = .Cells(23 + Offset, 13)
Label25.Caption = .Cells(24 + Offset, 13)
End With
End Sub
je visualise bien une boucle pour les labels
for i = 1 to 25
sauf pour les offset qui se repeter je suis dans le vide
alors j'aurais besoin de votre aide svp
alors merci a la'avance
dennnisss
Private Sub UserForm_Initialize()
Dim Offset As Integer
With Feuil5
Label1.Caption = .Cells(20 + Offset, 1)
Label2.Caption = .Cells(21 + Offset, 1)
Label3.Caption = .Cells(22 + Offset, 1)
Label4.Caption = .Cells(23 + Offset, 1)
Label5.Caption = .Cells(24 + Offset, 1)
Label6.Caption = .Cells(20 + Offset, 4)
Label7.Caption = .Cells(21 + Offset, 4)
Label8.Caption = .Cells(22 + Offset, 4)
Label9.Caption = .Cells(23 + Offset, 4)
Label10.Caption = .Cells(24 + Offset, 4)
Label11.Caption = .Cells(20 + Offset, 7)
Label12.Caption = .Cells(21 + Offset, 7)
Label13.Caption = .Cells(22 + Offset, 7)
Label14.Caption = .Cells(23 + Offset, 7)
Label15.Caption = .Cells(24 + Offset, 7)
Label16.Caption = .Cells(20 + Offset, 10)
Label17.Caption = .Cells(21 + Offset, 10)
Label18.Caption = .Cells(22 + Offset, 10)
Label19.Caption = .Cells(23 + Offset, 10)
Label20.Caption = .Cells(24 + Offset, 10)
Label21.Caption = .Cells(20 + Offset, 13)
Label22.Caption = .Cells(21 + Offset, 13)
Label23.Caption = .Cells(22 + Offset, 13)
Label24.Caption = .Cells(23 + Offset, 13)
Label25.Caption = .Cells(24 + Offset, 13)
End With
End Sub