Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
JB
Bonjour,
Sub essai() If Not ExisteFeuille("xxxx") Then Sheets.Add ActiveSheet.Name = "xxxx" End If End Sub
Function ExisteFeuille(f) As Boolean Application.Volatile On Error Resume Next Err = 0 temp = Sheets(UCase(f)).[A1] If Err = 0 Then ExisteFeuille = True Else ExisteFeuille = False End Function
Function ExisteFeuille2(f) 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
JB
comment détecter que l'indice n'appartient pas à la sélection ?
Sub CréerFeuille() ltrouver = False
' pour une plage de cellules sélectionner
For Each fn In ActiveWindow.RangeSelection If fn.Text = "" = False Then
' If VarType(Sheets(fn.Text)) < CInt(2) Then
' vérifier si la feuille existe If IsNull(Sheets(fn.Text)) Then ActiveWorkbook.Sheets.Add after:=Worksheets(Worksheets.Count)
End If End If
Next fn
Sheets.Select
eddy a+
Bonjour,
Sub essai()
If Not ExisteFeuille("xxxx") Then
Sheets.Add
ActiveSheet.Name = "xxxx"
End If
End Sub
Function ExisteFeuille(f) As Boolean
Application.Volatile
On Error Resume Next
Err = 0
temp = Sheets(UCase(f)).[A1]
If Err = 0 Then ExisteFeuille = True Else ExisteFeuille = False
End Function
Function ExisteFeuille2(f) 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
JB
comment détecter que l'indice n'appartient pas à la sélection ?
Sub CréerFeuille()
ltrouver = False
' pour une plage de cellules sélectionner
For Each fn In ActiveWindow.RangeSelection
If fn.Text = "" = False Then
' If VarType(Sheets(fn.Text)) < CInt(2) Then
' vérifier si la feuille existe
If IsNull(Sheets(fn.Text)) Then
ActiveWorkbook.Sheets.Add
after:=Worksheets(Worksheets.Count)
Sub essai() If Not ExisteFeuille("xxxx") Then Sheets.Add ActiveSheet.Name = "xxxx" End If End Sub
Function ExisteFeuille(f) As Boolean Application.Volatile On Error Resume Next Err = 0 temp = Sheets(UCase(f)).[A1] If Err = 0 Then ExisteFeuille = True Else ExisteFeuille = False End Function
Function ExisteFeuille2(f) 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
JB
comment détecter que l'indice n'appartient pas à la sélection ?
Sub CréerFeuille() ltrouver = False
' pour une plage de cellules sélectionner
For Each fn In ActiveWindow.RangeSelection If fn.Text = "" = False Then
' If VarType(Sheets(fn.Text)) < CInt(2) Then
' vérifier si la feuille existe If IsNull(Sheets(fn.Text)) Then ActiveWorkbook.Sheets.Add after:=Worksheets(Worksheets.Count)
End If End If
Next fn
Sheets.Select
eddy a+
Eddy Maue
Merci et bonsoir,
JB submitted this idea :
Bonjour,
Sub essai() If Not ExisteFeuille("xxxx") Then Sheets.Add ActiveSheet.Name = "xxxx" End If End Sub
Function ExisteFeuille(f) As Boolean Application.Volatile On Error Resume Next Err = 0 temp = Sheets(UCase(f)).[A1] If Err = 0 Then ExisteFeuille = True Else ExisteFeuille = False End Function
Function ExisteFeuille2(f) 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
JB
comment détecter que l'indice n'appartient pas à la sélection ?
Sub CréerFeuille() ltrouver = False
' pour une plage de cellules sélectionner
For Each fn In ActiveWindow.RangeSelection If fn.Text = "" = False Then
' If VarType(Sheets(fn.Text)) < CInt(2) Then
' vérifier si la feuille existe If IsNull(Sheets(fn.Text)) Then ActiveWorkbook.Sheets.Add after:=Worksheets(Worksheets.Count)
End If End If
Next fn
Sheets.Select
eddy a+
Merci et bonsoir,
JB submitted this idea :
Bonjour,
Sub essai()
If Not ExisteFeuille("xxxx") Then
Sheets.Add
ActiveSheet.Name = "xxxx"
End If
End Sub
Function ExisteFeuille(f) As Boolean
Application.Volatile
On Error Resume Next
Err = 0
temp = Sheets(UCase(f)).[A1]
If Err = 0 Then ExisteFeuille = True Else ExisteFeuille = False
End Function
Function ExisteFeuille2(f) 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
JB
comment détecter que l'indice n'appartient pas à la sélection ?
Sub CréerFeuille()
ltrouver = False
' pour une plage de cellules sélectionner
For Each fn In ActiveWindow.RangeSelection
If fn.Text = "" = False Then
' If VarType(Sheets(fn.Text)) < CInt(2) Then
' vérifier si la feuille existe
If IsNull(Sheets(fn.Text)) Then
ActiveWorkbook.Sheets.Add
after:=Worksheets(Worksheets.Count)
Sub essai() If Not ExisteFeuille("xxxx") Then Sheets.Add ActiveSheet.Name = "xxxx" End If End Sub
Function ExisteFeuille(f) As Boolean Application.Volatile On Error Resume Next Err = 0 temp = Sheets(UCase(f)).[A1] If Err = 0 Then ExisteFeuille = True Else ExisteFeuille = False End Function
Function ExisteFeuille2(f) 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
JB
comment détecter que l'indice n'appartient pas à la sélection ?
Sub CréerFeuille() ltrouver = False
' pour une plage de cellules sélectionner
For Each fn In ActiveWindow.RangeSelection If fn.Text = "" = False Then
' If VarType(Sheets(fn.Text)) < CInt(2) Then
' vérifier si la feuille existe If IsNull(Sheets(fn.Text)) Then ActiveWorkbook.Sheets.Add after:=Worksheets(Worksheets.Count)