1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| Do While fichier <> ""
ProgBarValue = k / i
frmProgBar.ListProg.AddItem "Traitement de " & fichier
Call ProgressBar
Workbooks.Open chemin & fichier
Set Classeur = Workbooks(fichier)
On Error Resume Next
For j = 1 To Classeur.VBProject.VBComponents.Count
If Classeur.VBProject.VBComponents.Item(j).Name = "Module11" Then
Classeur.VBProject.VBComponents.Remove Classeur.VBProject.VBComponents.Item("Module11")
Classeur.VBProject.VBComponents.Import (Correctif)
Classeur.Sheets(1).Unprotect ("alexandre")
Classeur.Sheets(1).Range("chek").FormulaR1C1 = "=IF(entree_nominale^2+tol_sup_entree_a^2+tol_inf_entree_a^2=0,""Empty"",IF(RC[7]<>0,""NOk"",""OK""))"
Classeur.Sheets(1).Protect ("alexandre"), DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowSorting:=True, AllowFiltering:=True, AllowUsingPivotTables:=True, AllowFormattingColumns:=True, AllowFormattingRows:=True
Exit For
End If
Next j
On Error GoTo 0
Workbooks(fichier).Close True
fichier = Dir
k = k + 1
Loop |
Partager