Delete Worksheet while workbook contains Macro

Hi

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.

Thanks.

Q


3 Replies

GM Geetha M Syncfusion Team September 22, 2008 09:05 AM UTC

Hi,

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.

Regards,
Geetha



AD Administrator Syncfusion Team September 22, 2008 05:12 PM UTC

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.

thanks,

Q



GM Geetha M Syncfusion Team September 29, 2008 12:10 PM UTC

Hi,

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.

Regards,
Geetha


Loader.
Up arrow icon