Bonjour,
J'essaye d'écrire plusieurs fichier excel, mais à l'écriture du second j'ai une erreur la métode row de l'objet _global a échoué
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
26
27
28
29 compteur = cpt1 Call rempliXLS(s1()) compteur = cpt2 Call rempliXLS(s2()) compteur = cpt3 Call rempliXLS(s3()) ___________________________ Sub rempliXLS(ByRef Structure() As UnIndividu) Set appExcel = CreateObject("Excel.Application") Set wbExcel = appExcel.Workbooks.Add For i = 2 To compteur Rows("1:" & i).Select ... Next wbExcel.SaveAs ("\\...\ftproot\" & r & "\" & f) wbExcel.Close 'Fermeture du classeur Excel Set wbExcel = Nothing appExcel.Quit 'Fermeture de l'application Excel Set appExcel = Nothing End Sub
Partager