Sub Test()
Dim M As VBComponent
For Each M In Application.VBE.ActiveVBProject.VBComponents
If M.Name = 'Feuil1' Then
M.CodeModule.AddFromString ''écrit le code'
Exit For
End If
Next M
End Sub