bonjour
je n'arrive à regler mon petit soucis d'ecriture pour ce bout de code :
For Each xCell In ThisWorkbook.Sheets("Feuil1").Range("C21:C100")
For Each WsB In WbkB.Worksheets
If xCell = WsB.Name And WsB.Name = "comptabilité" Then
WsB.Copy after:=WbkT.Sheets(WbkT.Sheets.Count)
le soucis est sur la ligne :
If xCell = WsB.Name And WsB.Name = "comptabilité" Then
il n'y a aucune copie qui se fait , mais si j'enleve
And WsB.Name = "comptabilité"
ca marche , comment puis je faire
pour inclure cette instruction , mon ecriture semble pourtant correcte ?
merci