Je recherche la fonction,de type boolean par exemple, me permettant de tester si un fichier est déjà ouvert sur mon excel. (Conflit d'ouverture si déjà ouvert).
Public Sub closeOpenedWorkbook(sFilePath As String)
Dim wkb As Workbook
For Each wkb In Workbooks
If wkb.FullName = sFilePath Then
Application.DisplayAlerts = False
wkb.Close False
Application.DisplayAlerts = True
Exit For
End If
Next