Private Sub CmdCreerFeuilles_Click()
Sheets("Model").Visible = xlSheetVisible
Dim cell As Range, Nom As Range, Sht As String
Dim i As Integer
i = 4
For Each Nom In Range([E5], [E65536].End(xlUp))
i = i + 1
If Nom.Value <> "" Then
On Error Resume Next
Sht = Sheets(Nom.Value).Name
If Err.Number <> 0 Then Sht = ""
On Error GoTo 0
If Sht = "" Then
Sheets("model").Copy After:=Sheets(Sheets.Count)
ActiveSheet.Name = Nom.Value
ActiveSheet.Cells(3, 8) = Sheets("PARTS SUMMARY").Cells(i, 2)
ActiveSheet.Cells(2, 10) = Sheets("PARTS SUMMARY").Cells(i, 3)
ActiveSheet.Cells(2, 8) = Sheets("PARTS SUMMARY").Cells(i, 4)
ActiveSheet.Cells(3, 3) = Sheets("PARTS SUMMARY").Cells(i, 6)
ActiveSheet.Cells(3, 5) = Sheets("PARTS SUMMARY").Cells(i, 7)
ActiveSheet.Cells(2, 5) = Sheets("PARTS SUMMARY").Cells(i, 8)
ActiveSheet.Cells(5, 3) = Sheets("PARTS SUMMARY").Cells(i, 12)
ActiveSheet.Cells(5, 5) = Sheets("PARTS SUMMARY").Cells(i, 13)
ActiveSheet.Cells(5, 8) = Sheets("PARTS SUMMARY").Cells(i, 14)
Sheets("PARTS SUMMARY").Activate
Nom.Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
"'" & Nom.Value & "'!A1"
End If
End If
Next
Sheets("Model").Visible = xlSheetVeryHidden
End Sub