I think you're confusing the worksheet .Name (15 minutes Inter - 1st Week Nov) and it's .CodeName (Sheet1), which you can change BTW
Capture.JPG
Option Explicit
Sub AddCode()
Dim ws As Worksheet: Set ws = Sheet1 ' <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Dim wb As Workbook: Set wb = ActiveWorkbook
Dim code As String: code = "Sub Duh()" & vbCrLf & " debug.print(""I'm Here!"")" & vbCrLf & "End Sub"
With wb.VBProject.VBComponents(ws.CodeName).CodeModule ' <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
If .CountOfLines > 0 Then .DeleteLines 1, .CountOfLines
.AddFromString code
End With
End Sub