Sub EcrireCode(Feuil1 As String)
Dim LeCode(1 To 5), NomClasseur As String, Wb As Workbook, WS As String
NomClasseur = ActiveWorkbook.Name
LeCode(1) = "Private Sub ComboBox1_Change()"
LeCode(2) = "Dim Choix As String"
LeCode(3) = "Choix = Me.ComboBox1.Value"
LeCode(4) = "Call Module1.Liste_deroulante(Choix)"
LeCode(5) = "End Sub"
Set Wb = Workbooks(NomClasseur)
WS = Worksheets(Feuil1).CodeName
For i = 1 To 5
Wb.VBProject.VBComponents(WS).CodeModule.InsertLines i, LeCode(i)
Next
End Sub