Reinstating macros after user saved without?

BigJ

Board Regular
Joined
Sep 23, 2004
Messages
50
Hi

Sorry if this has been answered before, but I can't figure out the right query to search the forum (...got some interesting hits while trying though!).

I have a macro-laden workbook set up as a template. If users save the resulting spreadsheet as an xlsx instead of an xlsm (i.e. they either use "save as" or they don't read the dialog box properly telling them it's about to take the macros out when using "save") is there a way to reinstate the macro functionality?

Thanks

Jackie
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

AnAnalyst

Well-known Member
Joined
Jul 10, 2007
Messages
536
Hi,

If macros are essential to the operation of the application then I would force the user down the route of saving as .xlsm, probably using the workbook BeforeSave event to show the save as dialog defaulted to xlsm.

Afaik there is no way to recover the macros that have been lost. The only option for reinstating them would be to export the project files from the template and import the code back into the xlsx, then save as xlsm.

... but prevention is better than cure!

HTH
 

BigJ

Board Regular
Joined
Sep 23, 2004
Messages
50
Hi,

If macros are essential to the operation of the application then I would force the user down the route of saving as .xlsm, probably using the workbook BeforeSave event to show the save as dialog defaulted to xlsm.

HTH

Hadn't thought of that, d'oh . Thanks!

Jackie
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,400
Messages
5,831,411
Members
430,065
Latest member
ctornabe

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top