Fonction ExisteFeuille

Renvoie VRAI si la feuille existe.

Function ExisteFeuille(f As String) As Boolean
  Application.Volatile
  On Error Resume Next
  temp = Sheets(UCase(f)).[A1]
  If Err = 0 Then ExisteFeuille = True Else ExisteFeuille = False
End Function

Function ExisteFeuille2(f As String) As Boolean
  i = 1
  For i = 1 To Sheets.Count
    If UCase(f) = UCase(Sheets(i).Name) Then
      ExisteFeuille2 = True
    End If
  Next i
End Function

Sub essai()
  If Not ExisteFeuille("xxxx") Then
    Sheets.Add
    ActiveSheet.Name = "xxxx"
  End If
End Sub