Fermer Excel.exe complètement.

tatayoyo38

XLDnaute Nouveau
Bonjour,
J'utilise ce code pour fermer Excel :

Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)

ActiveWindow.DisplayGridlines = True
ActiveWindow.DisplayHeadings = True
ActiveWindow.DisplayHorizontalScrollBar = True
ActiveWindow.DisplayWorkbookTabs = True
Application.DisplayFullScreen = False

Application.DisplayFormulaBar = True
Application.DisplayStatusBar = True
Application.WindowState = xlMaximized
Application.ScreenUpdating = True

Application.Quit

End Sub

Surtout la derniere ligne en fait.
Seul soucit, il reste afficher dans mon Task Manager et comme je lance excel via un fichier bat le fichier bat ne peut pas continuer car il attend la fermeture de excel.

Comment faire ?
Merci a tous.
 

tatayoyo38

XLDnaute Nouveau
Re : Fermer Excel.exe complètement.

Voila la soluce ^^ lol :

Code:
Dim ChClose$
ChClose = ActiveWorkbook.Path & "\"
Call Shell(Environ$("COMSPEC") & " /k" & """ & ChClose & """ & "Close.bat", vbNormalFocus)

EDIT : En fait non, le bat m'affciche & était innatendu. ^^
 
Dernière édition:

Discussions similaires

Membres actuellement en ligne

Statistiques des forums

Discussions
312 104
Messages
2 085 349
Membres
102 869
dernier inscrit
radyreth