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
| Dim xlWk As Workbook
Dim bResulTrait As Boolean
Dim bRefreshPilotage As Boolean
'Initialisations
Ouverture = False
lTempsRefresh = lTempsRefreshMini
'Récupération des infos sources
Set xlWk = Application.Workbooks.Open(Filename:=sPathPilotage, ReadOnly:=True)
Application.EnableEvents = True
bRefreshPilotage = Application.Run(xlWk.Name & "!" & "Rafraîchir_Sources") 'L'exécution s'arrête à ce niveau là
If bRefreshPilotage Then
If Not Fichier_Verrouillé(sPathPilotage) Then
xlWk.Close (False)
Set xlWk = Application.Workbooks.Open(Filename:=sPathPilotage, ReadOnly:=False)
End If
End If
bResulTrait = Application.Run(xlWk.Name & "!" & "Traitement_Ouverture", ThisWorkbook)
xlWk.Close (False)
Set xlWk = Nothing
If Not bResulTrait Then
Exit Function
End If |
Partager