Ok, good question, and I will keep track of what is happening here.
, . , , VBA script .
, :
oBook = objExcel.ActiveWorkbook;
oModule = oBook.VBProject.VBComponents.Add(VBIDE.vbext_ComponentType.vbext_ct_StdModule);
string sCode = "sub myVBASub()\r\n"+
"msgbox("Hello")\r\n"+
"End Sub\r\n";
oModule.CodeModule.AddFromString(sCode);