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 31 32 33 34 35 36 37 38 39
| Sub Principal()
' Dim LeFichier As Variant
Dim WsCR As Worksheet
' Dim i As Integer
Dim Tmp, TbSyn
' Set WsCR = à compléter !
Application.ScreenUpdating = False
' LeFichier = Application.GetOpenFilename("Excel Files (*.xls*), *.xls*", , , , True)
For Each Fichier In Application.GetOpenFilename("Excel Files (*.xls*), *.xls*", , , , True)
If ImportData(Fichier) Then
B = True
' Appel de Cycle 0
Call CycleZero(WsCR)
' Appel pour les autres cycles
Tmp = WsCR.Range("C19:AI19")
For i = 1 To 20
Call CycleN(WsCR, Tmp, 8 + 17 * i, 7 + 14 * i)
Next i
Call CycleFinal(WsCR)
Call Synthese(WsCR)
TbSyn = WsCR.Range("C324:AI336")
' ici on va continuer le code pour les autres traitements
' La variable TbSyn comporte déjà les données de synthèse brutes qu'on va par la suite traiter
Set WsCR = Nothing
End If
Next Fichier
If B Then MsgBox "Traitement terminé", , "Confirmation" _
Else MsgBox "Aucun fichier traité", , "Annulation"
End Sub |
Partager