Microsoft 365 Macro indique qualificateur incorrect

BEOS

XLDnaute Nouveau
Bonjour. Je vous affiche mon code. En l'éxécutant j'ai une erreur compilation: qualificateur incorrect. Pourriez-vous m'aider s'il vous plait?
Merci

Sub test()

Dim j As Integer, i As Integer, lig As Integer, dlg As Integer, ws As Worksheet
With Sheets("Récap")
dlg = .Cells.Find("*", LookIn:=xlValues).Row + 1
If dlg = 1 Then dlg = 2
.Range("A2:C" & dlg).ClearContents
dlg = 0
End With
With Sheets("Source")
For j = .Range("H" & .Rows.Count).End(xlUp).Row To 2 Step -1
For Each ws In ThisWorkbook.Worksheets
If ws.CodeName = "Feuil1" Or ws.CodeName = "Feuil2" Or ws.CodeName = "Feuil3" Then
On Error Resume Next
lig = ws.CodeName.Cells.Find(.Range("H" & j), LookIn:=xlValues, lookat:=xlWhole).Row
If lig > 0 Then
dlg = ws.CodeName.Cells.Find("*", LookIn:=xlValues).Row + 1
ws.CodeName.Range("A" & i & ":B" & i).Copy Sheets("Récap").Range("A" & dlg)
ws.CodeName.Range("D" & i).Copy Sheets("Récap").Range("C" & dlg)
End If
End If
Next ws
Next j
End With
End Sub
 

soan

XLDnaute Barbatruc
Inactif
@BEOS

j'ai mis dans mon post #15 le fichier modifié ; il s'agit de cette ligne :

Cells(lg3, 3) = tbl(lg2, 8) 'Matricule

qui est devenue :

Cells(lg3, 3) = tbl(lg2, 4) 'Matricule

car avant, ça mettait les adresses "Mail" au lieu du "Matricule" ;
désolé pour cette petite erreur d'étourderie ; bug corrigé. :)


soan
 

Discussions similaires

Réponses
7
Affichages
311

Statistiques des forums

Discussions
312 044
Messages
2 084 832
Membres
102 685
dernier inscrit
med_remi021