Comunication entre deux classeur
m
Bonjour,
Je souhaiterais que deux classeur arrive a comuniquer ensemble enfin que je trouve une feuille dans le classeur B par son nom qui est indiqué dans le classeur A mais a priori je n'est pas trop compris comment cela fonctionnait le code incirmé est le suivant
Sub AddTool()
Set WBSYNC = ActiveWorkbook
Dim Produit As String
For i = 8 To Sheets(1).Range("A65535").End(xlUp).Row - 1
Range("D" & i & ":XFD" & i).ClearContents
If IsDate(Cells(i, 1).Value) = True Then
For j = 2 To Sheets.Count
If Sheets(j).Name = Produit Then
For k = 2 To Sheets(j).Range("IV1").End(xlToLeft).Column
Cells(i, k + 2).Value = Sheets(j).Cells(Sheets(j).Range("A65535").End(xlUp).Row, k).Value
For l = 2 To 5
If Left(Cells(i, k + 2).Value, 1) = Cells(l, 1).Value Then
Set WBListing = Workbooks.Open(ThisWorkbook.Path & "\" & Cells(l, 3).Value)
WBListing.Activate
With Sheets("WBSYNC.Cells(i, k + 2).Value")
For m = 2 To .Range("A65535").End(xlUp).Row
If Cells(m, 1).Value = WBSYNC.Cells(i, 1).Value Then
WBSYNC.Cells(i, k + 2).Interior.Color = 5296274
Else
WBSYNC.Cells(i, k + 2).Interior.Color = 255
End If
Next
End With
WBSYNC.Activate
WBListing.Close
Exit For
End If
Next
Next
End If
Next
Else
Produit = Cells(i, 1).Value
End If
Next
End SubEt en articuler la ligne
With Sheets("WBSYNC.Cells(i, k + 2).Value")
Je vous joint egalement les fichier au besoin merci d'avance de votre aide retour.
m
Je me permet de remonter le topic car malheureusement j'ai beau cherche je ne doit pas trouver ou chercher les bonne chose car je suis toujours coincé :/