Hello All,
Basically i'm trying to write an Automation Addin that implements the IDTExtensibilty2 interface which allows my Addin to receive a reference to the Excel Object the Addin is running on. I can do this all fine and i can use the Excel reference to return and set cell values on the active worksheet so i know that the reference is set right.
However the first thing my Addin needs to do is add a new worksheet to the workbook so i used the following code (moXL is the reference to the Excel object) :
but this does nothing! Is it not possible to create new worksheets from within an Addin or could i be missing something?Code:moXL.Worksheets.Add After:=moXL.Sheets(moXL.Sheets.Count)
Cheers.




Reply With Quote