On Error Resume Next 'Ouverture de la gestion de problème
Set wk0 = Workbooks("DOC2.xls")
If Err <> 0 Then
Set wk0 = Workbooks.Open("C:\DOC2"): Flag = True
If Err <> 0 Then
MsgBox ("Le fichier C:\DOC2.xls n'existe pas")
Exit Sub 'Affichage d'un message d'erreur si le fichier n'existe pas
End If
End If
On Error GoTo 0 'Fermeture de la gestion de problème
Set wk1 = Workbook("Doc1.xls")