Bonjour,
Un début de réponse.
Et ci-dessous la procédure principale.
Cdlt.
Public Sub Creer_onglets()
Dim wb As Workbook
Dim wsS As Worksheet, wsM As Worksheet
Dim objList As ListObject
Dim Cell As Range
Dim strWs As String
Application.ScreenUpdating = False
Set wb = ActiveWorkbook
Set wsS = wb.Worksheets("Données")
Set wsM = wb.Worksheets("Modèle")
Set objList = wsS.ListObjects(1)
For Each Cell In objList.DataBodyRange.Columns(1).Cells
strWs = Trim(Cell & " " & Cell.Offset(0, 1))
If Not NameSheetExists(strWs) Then
With wsM
.Cells(1, 2) = Cell.Offset(0, 2)
.Cells(2, 2) = Cell.Offset(0, 3)
.Cells(1, 7) = Trim(Cell)
.Cells(1, 9) = Trim(Cell.Offset(0, 1))
.Cells(2, 7) = Cell.Offset(0, 6)
.Cells(1, 14) = Trim(Cell.Offset(0, 5))
.Cells(2, 14) = Cell.Offset(0, 4)
.Copy after:=Worksheets(Worksheets.Count)
ActiveSheet.Name = strWs
End With
Else
MsgBox "La fiche " & strWs & " existe déja.", vbInformation
End If
Next Cell
Set objList = Nothing
Set wsS = Nothing: Set wsM = Nothing
Set wb = Nothing
End Sub