Bonjour Kassou, Pedro,
j'ai vu ta copie d'écran ; pour ta ligne en bleu, il manque Dim
devant ! Dim NLig As Integer...
tant que j'y suis, tu devrais corriger des types ! ce serait plutôt :
Dim Nlig As Long, Ncol As Byte, Lmax As Long, RefMax As Long, Lref As Long, DerLig As Long, Source As Workbook, Destination As Workbook
OU en notation abrégée :
Dim Nlig&, Ncol As Byte, Lmax&, RefMax&, Lref&, DerLig&, Source As Workbook, Destination As Workbook
note qu'en général, c'est le type Long pour une ligne et Integer pour une colonne ; mais comme ton Ncol va de 16 à 21, un Byte suffit ; s'il avait fallu NCol As Integer, tu aurais pu l'abréger en Ncol%
attention : tu as mis Set Destination = "Fichier à alimenter.xlsx"
* soit c'est ça et faut mettre Dim Destination As String
OU Dim Destination$
* soit faut mettre Set Destination = Workbooks("Fichier à alimenter.xlsx")
(j'me suis pas plongé dans ton code en détail ! )
@Pedro : t'as oublié d'prendre ton café ?
dhany