Dim num As String, NbC As Integer
Dim chemin As String, nomFichier As String
Dim wbA As Workbook, wsA As Worksheet
Dim wb As Workbook, wsM As Worksheet
Dim wbCreate As Workbook, wsCreate As Worksheet
Workbooks.Open Filename:="" & chemin & "numA" & num & ".xls"
Set wbA = ActiveWorkbook
Set wsA = wbA.Worksheets("Nomenclature")
wsA.Copy [COLOR="Red"] 'crée un nouveau classeur ![/COLOR]
ActiveSheet.Name = "Comp_M"
ActiveWorkbook.Save
ActiveWorkbook.Name = "" & chemin & "numA" & num & "_M.xls" [COLOR="Red"]'Impossible d'affecter à une propriété en lecture seule !
[/COLOR]
Set wbM = Workbooks.Add("" & chemin & "numA" & num & "_M.xls")
Set wsM = wbM.Worksheets(1)
wsCreate.Range("L17:BL1500").Copy
wsM.Range("L18").PasteSpecial xlPasteAll