Suite du programme impossible
Amis du forum, bonjour
Dans mon code
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| '****************************** Demande de lancement du programme
msg = "ATTENTION, ENVOIS DES STATISTIQUES AU RESEAU : LANCEMENT PROGRAMME ( OUI / NON ) ?"
Style = vbYesNo + vbDefaultButton2
Response = MsgBox(msg, Style, Title, Help, Ctxt)
'****************************** Si réponse négative, clôture des fichiers
If Response = vbNo Then
Set oWbk = GetObject("V:\DPDI\GFL\SCG-CHQ\PEXTRAIT\BASES EXCEL\STATS SCAN MENSUEL\Liste_Envoi_stat_agence.xls")
oWbk.Close
Dim Wb As Workbook
For Each Wb In Workbooks
If Wb.Name = ActiveWorkbook.Name Then
Wb.Close True
End If
Next Wb
End If |
lorsque je clos le fichier "Liste_Envoi_stat_agence.xls", ma macro, au lieu de continuer par la fermeture du fichier actif se termine.
Quelqu'un saurait-il d'où peut venir le problème ?