Bonjour,
A tester. Ajoute cette fonction personnalisée dans ton module:
Public Function Feuille_existe(Nom_feuille As String, Optional Wb As Workbook) As Boolean
Dim Ws As Worksheet
' utilise le classeur actif par défaut
If Wb Is Nothing Then
Set Wb = ActiveWorkbook
End If
On Error Resume Next
Feuille_existe = CBool(Not Wb.Sheets(Nom_feuille) Is Nothing)
On Error GoTo 0
End Function
Puis remplace:
If existsws(nom) = False Then
par:
If Feuille_existe(nom) = False