Hide Warnings on Save

B

bmatuk

I would like to automate the running of macros in a number of Excel workbooks
(.xlsm files) with a VB.Net application.

The problem is that when the macro completes, and the code tries to save the
..xlsm file, I get the following privacy warning:
"
Privacy warning: This document contains macros, ActiveX controls, XML
expansion pack information, or Web components. These may include personal
information that cannot be removed by the Document Inspector.
"

Is there a way to suppress the warning, or to "OK" it implicitly? I checked
the Trust Center options, but couldn't find a setting that would disable this
warning.

Thanks!
 
F

FSt1

hi
put this before the save perfered at the start of the macro.
application.displayalerts = false

then at the end of the macro, before end sub
application.displayalerts = true.

i have not tried this in 07 but it works quite well in 03.
regards
FSt1
 
B

bmatuk

Thank you very much for your quick and accurate response!
Yes, it works wonderfully in Excel 2007.

Thanks for your help!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top