We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Delete Worksheet while workbook contains Macro

Thread ID:





76717 Sep 19,2008 03:59 PM Sep 29,2008 08:10 AM Windows Forms 3
Tags: XlsIO
Administrator [Syncfusion]
Asked On September 19, 2008 03:59 PM


It seems that when a excel file contains VBA Macro, doing the following:
Open the excel file into a IWorkbook object, and then delete some worksheets, save and then open the file in excel, goto excel's VB editor, you will see those deleted sheets still showing in the project explorer, but those sheets's properties seems to be ThisWorkbook's properties.

Any way to get rid of this. I need to frequently delete some sheets and insert new sheets into the same file. I am not sure this will create problem eventually.



Geetha M [Syncfusion]
Replied On September 22, 2008 05:05 AM


Thank you for your interest in Syncfusion products.

I am able to reproduce the problem. Using Essential XlsIO, you can preserve Macros and disable loading them when the spreadsheet is opened using MS Excel. To delete Macros upon deleting a worksheet is currently not possible using XlsIO and so this will be considered as a feature request.

Please let me know if you have any questions.


Administrator [Syncfusion]
Replied On September 22, 2008 01:12 PM

Hi Geetha,

Thanks for the reply.

I am not seeking to delete macros. my macros reside in thisworkbook or a module, not in the sheets that I am trying to delete. my problem is with the fact that there is some residual left for thos delete sheets and the residual can be seen in excel vb editor.



Geetha M [Syncfusion]
Replied On September 29, 2008 08:10 AM


I regret for the delay.

Currently it is not possible to achieve your requirement using Essential XlsIO. We will analyze the possibilities on this regard and update you.

Please let me know if you have any other questions.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.