Removing Security Warning After Macros have been removed

L

Legacy 277976

Guest
Does anyone know how to get rid of the warning that comes with Macros? It is something to the effect of a warning of potential hazards of opening a document with Macros.

A lot of the spreadsheets I work on I need to distribute and people get scared of opening or changing settings in excel when there is a security warning. I need to be able to use macros to complete tedious and repetitive tasks in Excel, but once I have completed my work and I remove the macros, the message persists whenever the document is opened.

I want to get rid of the message after I remove Macros (i.e. not to remove the message even when macros are present)
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
If you remove all the VBA code then save your file, that message shouldn't appear the next time the file is opened.

Is it possible you have some code in the ThisWorkbook module or Sheet code modules?

If you users all have xl2007 or later, you can save the file in xlsx format. That should ensure there is no VBA content in the file and that the message doesn't appear.
 
Upvote 0
As has been pointed out, save the file as xlsx (if you have that capability).

If saving as xls, it is not enough to delete the code. Remove all modules (other than code modules associated with Excel objects). In those, delete all the code.

But, why do you add code in the first place? Put the code in a separate workbook that you never distribute and leave the data workbook code-free.

Does anyone know how to get rid of the warning that comes with Macros? It is something to the effect of a warning of potential hazards of opening a document with Macros.

A lot of the spreadsheets I work on I need to distribute and people get scared of opening or changing settings in excel when there is a security warning. I need to be able to use macros to complete tedious and repetitive tasks in Excel, but once I have completed my work and I remove the macros, the message persists whenever the document is opened.

I want to get rid of the message after I remove Macros (i.e. not to remove the message even when macros are present)
 
Upvote 0
That sounds good, I'll try it with the .xlsx file type - I am using Excel 2010.

For the separate workbook soluion - do you mean have a workbook with macros, do all the changes and then just copy and paste it over? I know it's a rather open question as there are all sorts of macro function under the sun. I have done something similiar with Word macros where I have a functional document that carries all the macros stuff.
 
Upvote 0
No, not quite what I meant.

The code works directly with the data in another workbook. One of the key stepping stones in making that happen is to understand the difference between ThisWorkbook and ActiveWorkbook.

You may also want to learn how to avoid Activate and Select statements. See Beyond Excel's recorder

That sounds good, I'll try it with the .xlsx file type - I am using Excel 2010.

For the separate workbook soluion - do you mean have a workbook with macros, do all the changes and then just copy and paste it over? I know it's a rather open question as there are all sorts of macro function under the sun. I have done something similiar with Word macros where I have a functional document that carries all the macros stuff.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,876
Members
452,363
Latest member
merico17

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
Back
Top