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
| Sub MacroMAX()
Application.ScreenUpdating = False
Dim apel, nom As String
Dim z
Dim days As String
Dim fichier As String
Dim c As Integer
Dim total
c = 1
apel = InputBox("Veuillez valider le chemin", "Sauvegarde", "T:xxxxxx ")
Do While Cells(c, 1).Value <> ""
nom = Cells(c, 1).Value
days = Format(Date, "yyyy-mm-dd")
fichier = nom & days & ".xls"
total = apel & "\" & nom
totalite = total & "\" & fichier
Cells(c, 2).Value = total
Cells(c, 3).Value = totalite
ChDir Cells(c, 2).Value
ActiveWorkbook.SaveAs Filename:=fichier, FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
c = c + 1
Loop
End Sub |
Partager