Bonjour,
J'ai écrit ce code qui fonctionne car je n'ai pas réussi à l'écrire de façon plus optimisé avec des For next...
Est-ce que quelqu'un pouurait m'aider ?
derligAction = [H65000].End(xlUp).Row + 1
derligPièce = [I5000].End(xlUp).Row + 1
derligMatériel = [J65000].End(xlUp).Row + 1
derligTravMicro = [K65000].End(xlUp).Row + 1
derligtravmacro = [L65000].End(xlUp).Row + 1
derligzonepré = [M65000].End(xlUp).Row + 1
derligZoneDépose = [N65000].End(xlUp).Row + 1
derligDéplacement = [O65000].End(xlUp).Row + 1
'actions
Cells(derligAction, 8) = Me.carac1 & " "
'pièces
Cells(derligPièce, 9) = Me.carac2 & " "
Cells(derligPièce + 1, 9) = Me.carac3 & " "
Cells(derligPièce + 2, 9) = Me.carac4 & " "
Cells(derligPièce + 3, 9) = Me.carac5 & " "
'matériel
Cells(derligMatériel, 10) = Me.carac6 & " "
Cells(derligMatériel + 1, 10) = Me.carac7 & " "
Cells(derligMatériel + 2, 10) = Me.carac8 & " "
Cells(derligMatériel + 3, 10) = Me.carac9 & " "
'Zone travail micro
Cells(derligTravMicro, 11) = Me.carac10 & " "
Cells(derligTravMicro + 1, 11) = Me.carac11 & " "
'zone travail macro
Cells(derligtravmacro, 12) = Me.carac12 & " "
Cells(derligtravmacro + 1, 12) = Me.carac13 & " "
'zone préhension
Cells(derligzonepré, 13) = Me.carac14 & " "
Cells(derligzonepré + 1, 13) = Me.carac15 & " "
Cells(derligzonepré + 2, 13) = Me.carac16 & " "
Cells(derligzonepré + 3, 13) = Me.carac17 & " "
'zone dépose
Cells(derligMatériel, 14) = Me.carac18 & " "
Cells(derligMatériel + 1, 14) = Me.carac19 & " "
Cells(derligMatériel + 2, 14) = Me.carac20 & " "
Cells(derligMatériel + 3, 14) = Me.carac21 & " "
'zone déplacement
Cells(derligMatériel, 15) = Me.carac22 & " "
Cells(derligMatériel + 1, 15) = Me.carac23 & " "
End Sub
J'ai écrit ce code qui fonctionne car je n'ai pas réussi à l'écrire de façon plus optimisé avec des For next...
Est-ce que quelqu'un pouurait m'aider ?
derligAction = [H65000].End(xlUp).Row + 1
derligPièce = [I5000].End(xlUp).Row + 1
derligMatériel = [J65000].End(xlUp).Row + 1
derligTravMicro = [K65000].End(xlUp).Row + 1
derligtravmacro = [L65000].End(xlUp).Row + 1
derligzonepré = [M65000].End(xlUp).Row + 1
derligZoneDépose = [N65000].End(xlUp).Row + 1
derligDéplacement = [O65000].End(xlUp).Row + 1
'actions
Cells(derligAction, 8) = Me.carac1 & " "
'pièces
Cells(derligPièce, 9) = Me.carac2 & " "
Cells(derligPièce + 1, 9) = Me.carac3 & " "
Cells(derligPièce + 2, 9) = Me.carac4 & " "
Cells(derligPièce + 3, 9) = Me.carac5 & " "
'matériel
Cells(derligMatériel, 10) = Me.carac6 & " "
Cells(derligMatériel + 1, 10) = Me.carac7 & " "
Cells(derligMatériel + 2, 10) = Me.carac8 & " "
Cells(derligMatériel + 3, 10) = Me.carac9 & " "
'Zone travail micro
Cells(derligTravMicro, 11) = Me.carac10 & " "
Cells(derligTravMicro + 1, 11) = Me.carac11 & " "
'zone travail macro
Cells(derligtravmacro, 12) = Me.carac12 & " "
Cells(derligtravmacro + 1, 12) = Me.carac13 & " "
'zone préhension
Cells(derligzonepré, 13) = Me.carac14 & " "
Cells(derligzonepré + 1, 13) = Me.carac15 & " "
Cells(derligzonepré + 2, 13) = Me.carac16 & " "
Cells(derligzonepré + 3, 13) = Me.carac17 & " "
'zone dépose
Cells(derligMatériel, 14) = Me.carac18 & " "
Cells(derligMatériel + 1, 14) = Me.carac19 & " "
Cells(derligMatériel + 2, 14) = Me.carac20 & " "
Cells(derligMatériel + 3, 14) = Me.carac21 & " "
'zone déplacement
Cells(derligMatériel, 15) = Me.carac22 & " "
Cells(derligMatériel + 1, 15) = Me.carac23 & " "
End Sub