Bonjour,
Désolé de vous dérangez mais je bloque sur la formule IF, je veux lui faire comprendre que quand elle selectionne le fichier xlsm en cours d'éxecution elle doit passer au prochain fichier
Pardon si je ne suis pas clair mais je débute ... et si il faut je peux poster le code en entier si c'est plus clair. Et j'imagine que le code n'est vraiment pas parfait!
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
30 Do While myFile <> "" Cells(c, 1) = myFile myFile = Dir() Cells(c, 5) = aa Cells(c, 6) = bonbon Worksheets("Feuil1").Range("B" & c).FormulaLocal = "=STXT(A" & c & ";1;9)" Worksheets("Feuil1").Range("c" & c).FormulaLocal = "=STXT(A" & c & ";10;20)" bonbon = myFile If TypeName(bonbon) = ThisWorkbook.Name Then GoTo boz Else Worksheets("Feuil1").Range("d" & c).FormulaLocal = "='" & ThisWorkbook.Path & "\" & bonbon & "'!total" Application.ScreenUpdating = False Workbooks.Open Filename:=myPath & "\" & myFile ActiveWorkbook.Sheets("Feuil1").Range("A1") = ThisWorkbook.Sheets("Feuil1").Range("A1") ActiveWorkbook.Save ActiveWorkbook.Close End If boz: c = c + 1 Loop
Merci par avance
Partager