I created a C# class to handle some of missing Excel application level events such as : Workbook close, worksheet rename, worksheet delete, range name added, range name deleted, application activated, application deactivated.
Excel does offer a workbook closing event, but the user can cancel it. The workbook closed event fires when the workbook actually closes.
Usage is fairly straightforward :
ExcelApplicationEvents _appEvents =
I created a C# .NET class to extract VBA from XLSM and XLAM Excel workbooks – even if password protected. I used Mirosoft’s Open XML SDK 2.5 to read a workbook’s VbaProjectPart stream. From the bin stream I extract the VBA source code using Structured Storage API’s.