Bonjour, je veux faire une copie de cellules d'un fichier excel pour le mettre dans un autre fichier excel mais mon code bugge sur la ligne en rouge
que puis je faire ?
par contre si vous avez une autre méthode n'hésistez pas j'essayerai
merçi
Il me signale propriété ou objet manquant
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 Private Sub Workbook_Open() Dim wbkAbs, wbkListe As Excel.Workbook Dim wksAbs As Excel.Worksheet Dim intFeuil As Integer Set wbkListe = Application.Workbooks.Open(Filename:="C:\Projet\GESTION DES ABSENCES\Promo 2005-2008\LISTES ABSENCES PROMO 2005 2008.xls") intFeuil = 1 Do While Not IsNull(Worksheets(intFeuil).Cells(26, 3).Value) wbkListe.Cells(intFeuil + 1, 6).Value = Worksheets(intFeuil).Cells(26, 3).Value wbkListe.Cells(intFeuil + 1, 7).Value = Worksheets(intFeuil).Cells(26, 5).Value intFeuil = intFeuil + 1 Loop wbkAbs.Close wksAbs = Nothing wbkAbs = Nothing End Sub
Partager