Sub Analyse()
'
' Analyse Macro
' Macro gravada em 25/04/2007 por Daniel Spilberg
'
Dim a, b As Integer
Dim fichier, codusi, USINE As String
For a = 15 To 33 Step 2
If Cells(a, 3).Value = True Then
codusi = Cells(a, 6).Value
fichier = Cells(5, 9) & Cells(3, 9) & "_Analyse_" & Cells(a, 6) &
".xls"
USINE = Cells(a, 4)
For b = 17 To 19 Step 2
If Cells(b, 7).Value = True Then
Select Case Cells(b, 9)
Case "Génération de l'analyse"
Workbooks.OpenText _
Filename:="U:\test.xls"
' pour ouvrir le fichier qui sera traité (M.xls)
Windows("Traitement_Vérification_Impression.xls").Activate
Workbooks.Open _
Filename:=Cells(a, 1), IgnoreReadOnlyRecommended:=True
Sheets("Initial").Select
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:="S:\Gestion
DT\2007\Test\M.xls"
Application.DisplayAlerts = True
Windows("test.xls").Activate
Application.Run "test.xls!A_test"
Windows("Traitement_Vérification_Impression.xls").Activate
Case "Vérification"
Workbooks.OpenText _
Filename:="S:\Gestion
DT\Vérification_cohérence_salaire_effectif\vérif_cohérence_salaire_effectif.xls"
Windows("Traitement_Vérification_Impression.xls").Activate
End Select
End If
Next b
'Workbooks(fichier).Close Savechanges:=False
End If
Next a
End Sub