I want to add a macro for onSheetChange event handler.
I am able to add a module via workbook.VbaProject.Modules.Add(“ModuleName”, “VB Code”);
But I want to add the macro code in the WorkBook or Worksheet object.
Is there any way to do this ?
using .Net 6.