{"id":269,"date":"2007-01-29T10:45:30","date_gmt":"2007-01-29T09:45:30","guid":{"rendered":"http:\/\/www.roumazeilles.net\/news\/en\/wordpress\/2007\/01\/30\/excel-tip-remove-the-ugly-macro-message\/"},"modified":"2009-03-13T12:32:01","modified_gmt":"2009-03-13T10:32:01","slug":"excel-tip-remove-the-ugly-macro-message","status":"publish","type":"post","link":"https:\/\/www.roumazeilles.net\/news\/en\/wordpress\/2007\/01\/29\/excel-tip-remove-the-ugly-macro-message\/","title":{"rendered":"Excel tip: Remove the ugly macro message"},"content":{"rendered":"<p>I believe that each and every Excel user already met the case where they open a file to receive a message dialog box announcing that there is a macro in the file and asking whether or not Excel should allow its execution. Unfortunately, in 99% of the cases, there is actually no macro and you may wonder how to stop this message (whatever you answer to the dialog box, it will come again and again).<\/p>\n<p>But, today, I bring you the answer, the solution, the way out.<!--more--><\/p>\n<p>As a matter of fact, this is happening when in the Excel file there was a macro added, then removed. So, there is no longer a macro, but Excel does not know for sure. You need to help it decide. You can completely inform it of the total absence of macro. It&#8217;s better and relatively easy.<\/p>\n<table width=\"30%\" align=\"right\" class=\"std_box\">\n<tr>\n<td>\n<p><strong>Warning<\/strong>: Always make a backup copy of the Excel file before you remove any code.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<ol>\n<li>Right click on any sheet tab and choose <code>View Code<\/code>, to open the Visual Basic Editor.<\/li>\n<li>In the Project Explorer at the left of the screen, locate the workbook.<\/li>\n<li>Locate a <code>Modules<\/code> folder, and open it. (If there is no <code>Modules<\/code> folder, go directly to Step 6.)<\/li>\n<li>For each module in the <code>Modules<\/code> folder:\n<ul>\n<li>Right-click on the module name.<\/li>\n<li>Choose <code>Remove [module_name]<\/code> (<code>[module_name]<\/code> is replaced with the actual name of the module)<\/li>\n<li>Click <code>No<\/code> when asked if you want to export.<\/li>\n<\/ul>\n<\/li>\n<li>Open the <code>Microsoft Excel Objects<\/code> folder.<\/li>\n<li>In order to clean each worksheet and <code>ThisWorkbook<\/code>:\n<ul>\n<li>Double-click on the worksheet to open it.<\/li>\n<li>Press <code>Ctrl+A<\/code> to select <em>all<\/em> the code (even if it looks empty).<\/li>\n<li>Press <code>Delete<\/code>.<\/li>\n<\/ul>\n<\/li>\n<li>Locate the <code>Forms<\/code> folder and open it.<\/li>\n<li>Delete any <code>UserForms<\/code>.<\/li>\n<li>Locate the <code>Class Modules<\/code> folder, and open it.<\/li>\n<li>Delete any <code>class<\/code> modules that it contains.<\/li>\n<li>Close the Visual Basic Editor.<\/li>\n<li>Save.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>I believe that each and every Excel user already met the case where they open a file to receive a message dialog box announcing that there is a macro in the file and asking whether or not Excel should allow its execution. Unfortunately, in 99% of the cases, there is actually no macro and you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[40,34],"tags":[],"class_list":["post-269","post","type-post","status-publish","format-standard","hentry","category-spreadsheet","category-tech"],"_links":{"self":[{"href":"https:\/\/www.roumazeilles.net\/news\/en\/wordpress\/wp-json\/wp\/v2\/posts\/269","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.roumazeilles.net\/news\/en\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.roumazeilles.net\/news\/en\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.roumazeilles.net\/news\/en\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.roumazeilles.net\/news\/en\/wordpress\/wp-json\/wp\/v2\/comments?post=269"}],"version-history":[{"count":0,"href":"https:\/\/www.roumazeilles.net\/news\/en\/wordpress\/wp-json\/wp\/v2\/posts\/269\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.roumazeilles.net\/news\/en\/wordpress\/wp-json\/wp\/v2\/media?parent=269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.roumazeilles.net\/news\/en\/wordpress\/wp-json\/wp\/v2\/categories?post=269"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.roumazeilles.net\/news\/en\/wordpress\/wp-json\/wp\/v2\/tags?post=269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}