Security Warning upon Save: This document contains Macros...

syswizard
4StarLounger
Posts: 584
Joined: 12 Jul 2012, 10:34

Security Warning upon Save: This document contains Macros...

Post by syswizard »

Tried everything to remove this warning message that occurs upon a Save.
When I tried to export the worksheet to a new workbook, all of the styles changed.

User avatar
HansV
Administrator
Posts: 78549
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Security Warning upon Save: This document contains Macro

Post by HansV »

What type of workbook is this? .xls, or one of the newer types .xlsm / .xlsb?
Best wishes,
Hans

syswizard
4StarLounger
Posts: 584
Joined: 12 Jul 2012, 10:34

Re: Security Warning upon Save: This document contains Macro

Post by syswizard »

Hans: xlsx
I think the export idea will work, but how do I get the styles to be the same ?
Everything changed....fonts, colors of cells, etc.

User avatar
HansV
Administrator
Posts: 78549
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Security Warning upon Save: This document contains Macro

Post by HansV »

A .xlsx workbook shouldn't contain macros, so it's weird that you'd get a warning about macros. Are you sure that it's a .xlsx workbook?
Best wishes,
Hans

User avatar
HansV
Administrator
Posts: 78549
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Security Warning upon Save: This document contains Macro

Post by HansV »

Try the following:
- Open the original workbook (the one that displays the warning).
- Open the new workbook.
- On the Home tab of the ribbon, in the Styles group, click Cell Styles > Merge Styles...
- Select the original workbook in the 'Merge styles from' list, then click OK.
Best wishes,
Hans

syswizard
4StarLounger
Posts: 584
Joined: 12 Jul 2012, 10:34

Re: Security Warning upon Save: This document contains Macro

Post by syswizard »

Hans - there are no macros or VBA coding in the XLSX document....very strange.
The merge styles procedure did not update the new workbook's styles using the old one's.
This is very strange...
I tried this fix as well...to no avail:
https://support.microsoft.com/en-us/kb/286394

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Security Warning upon Save: This document contains Macro

Post by Rudi »

Out of interest, have you checked if your *.xlsx workbook has any empty modules in the VBE.
Press ALT+F11 and verify if there are any blank modules in the Project Explorer window; and if so, right click on them and choose to remove.
(I do notice that stray modules get removed automatically in my Excel, but I'm not sure if this is native or if its a VBE add-in doing it??)

If you choose to pursue the export process, how about trying a plain copy and paste process for each sheet from the source workbook to a blank target workbook. When you paste, choose paste with source formatting. If this does not bring in the colour palettes you might try saving the theme in the source file as a *.thmx file (Page Layout Ribbon, Themes, Save Current Theme) and then in the target workbook, in the same command, browse for the saved theme to import it again.
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

syswizard
4StarLounger
Posts: 584
Joined: 12 Jul 2012, 10:34

Re: Security Warning upon Save: This document contains Macro

Post by syswizard »

Creating a new workbook didn't work either....when I selected the source worksheet and copied....
it created the same purple-orange garish style.

syswizard
4StarLounger
Posts: 584
Joined: 12 Jul 2012, 10:34

Re: Security Warning upon Save: This document contains Macro

Post by syswizard »

That worked !! Saving the thmx file, and then opening it in the new workbook did the trick !
Thanks much Hans....simply excellent support from this site !!
This was most definitely a subtle bug in Excel 2010.

User avatar
HansV
Administrator
Posts: 78549
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Security Warning upon Save: This document contains Macro

Post by HansV »

It was Rudi who suggested exporting/importing the .thmx file!
Best wishes,
Hans

syswizard
4StarLounger
Posts: 584
Joined: 12 Jul 2012, 10:34

Re: Security Warning upon Save: This document contains Macro

Post by syswizard »

Thanks Rudi !!!