On Jul 26, 1:06*pm, Mathieu936 <mathieu...@gmail.com> wrote:
> Hi!
>
> I have an add-in (.xlam) which copies a worksheet (which contains a
> Sub worksheet_calculate) in the current workbook.
>
> However, if the current workbook is an .xlsx format, and the user
> still saves in .xlsx format (regardless the message box saying that
> the macro will be deleted), the new inserted worksheet will lost its
> Sub worksheet_calculate.
>
> I really need to keep the Sub worksheet_calculate.
>
> Is there any code/fonction/way to avoid that the used save in .xlsx?
> The current workbook can be an existing file with .xlsx format, or a
> new freshly created workbook.
>
> Thanks!
Look in the ThisWorkbook module for before save and stop it within
that.
|