Bonjour
voila, j'essai de mettre le contenu de cellules d'un fichier excel a un autre
le code est :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 
Nomfichierentree = Application.GetOpenFilename("Fichier Excel (*.xlsx), *.xsl")
 
    Set Entree = Workbooks.Open(Nomfichierentree)
 
 
    NomfichierSortie = Application.GetOpenFilename("Fichier Excel (*.xlsx), *.xsl")
 
        Set Sortie = Workbooks.Open(NomfichierSortie)
 
FinalRow2 = Sortie.Worksheets(1).Cells(Rows.Count, 1).End(xlUp).Row
 
For j = 1 To nbLignes
  For xx = G(j) + 1 To hh(j) - 1
  For x = 3 To FinalRow2
 
   If Entree.Worksheets(1).Cells(xx, 1) = Sortie.Worksheets(1).Cells(x, 1) And Entree.Worksheets(1).Cells(xx, 2)  = Sortie.Worksheets(1).Cells(x, 2) Then
 
  Sortie.Worksheets(1).Cells(x, FF1(j)) = Sortie.Worksheets(1).Cells(x, FF1(j)) - Entree.Worksheets(1).Cells(xx, 7)
   End If
 
 
   Next x
   Next xx
   Next j
a la ligne Sortie.Worksheets(1).Cells(x, FF1(j)) =... j'ai l'erreur d'exécution 1004
erreur définie par l'application ou par l'objet
je vois pas trop..