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
| Sub LancementPilotage()
Dim dicofic As Dictionary, rg As Range, t()
Dim i As Integer, j As Integer, k As Integer, nb As Integer, ii As Integer
Dim l As Integer, pos As Integer
Dim y As Integer, m As Integer, d As Integer, h As Integer, n As Integer
Dim classeur_courant As String, dossier_save As String, elem
Dim fso As Object, Dossier As Object, Folder As Object, fles As Object
Dim listfic() As String, tab_temp() As String
classeur_courant = ThisWorkbook.Name
dossier_save = Workbooks(classeur_courant).Worksheets("Menu").Range("A10")
Set fso = CreateObject("Scripting.FileSystemObject")
Set Dossier = fso.GetFolder(dossier_save)
'''Création d'un dictionnaire pour le stockage des fichiers déja existants'''
Set dicofic = CreateObject("Scripting.Dictionary")
With ThisWorkbook.Sheets("Pilotage")
Set rg = .Range(.Cells(2, 1), .Cells(Application.Rows.Count, 1).End(xlUp))
t = rg
End With
On Error Resume Next
For j = 1 To UBound(t)
dicofic.Add t(j, 1), t(j, 1)
Next j
On Error GoTo 0
End Sub |
Partager