"Disable Macros"

B

Bob Barnes

I am an Access developer automating Access data to Excel.

I recorded a macro in Excel to get the appropropiate code
to use within Access. I then deleted the code.

But now opening the Excel file gives the message about
the file "...contains macros".

How can I ensure that warning does NOT appear when I open
the file?

TIA - Bob
 
T

Trevor Shuttleworth

Bob

you need to delete the empty module. Press Ctrl-F11 to open the VBE. Right
click on the module and choose to Remove the Module. Say no to saving the
Module.

Regards

Trevor
 
E

Ed

Try going into the VBA Editor (ALT+F11) for that workbook and deleting the
module that was created. Even if the code was deleted, if the module still
exists, Excel will tell you that you have macros. The only other way is to
set security to its lowest setting; then it will accept ALL macros.

HTH
Ed
 
B

Bob Barnes

Gentlemen (Ed & Trevor) - Thank you.

I have not been able to Post a Reply to both Ed & Trevor,
but "Alt-F11" gets me into the VBE. Then File ... Delete..
say "No" to copy somewhere else.

HTH - Bob
 
B

Bob Barnes

Gentlemen (Ed & Trevor) - Thank you.

I have not been able to Post a Reply to both Ed & Trevor,
but "Alt-F11" gets me into the VBE. Then File ... Delete..
say "No" to copy somewhere else.
 
T

Trevor Shuttleworth

Bob

no, not file delete ... close, no prize. In the Project Explorer Window
(Ctrl-R if you can't see it) you'll see your project. Click the plus signs
until you can see Module1 (or whatever). Right click on the module and
choose "Remove Modulex"...like we said ;-)

Regards

Trevor
 
B

Bob Barnes

Trevor - I'm using Excel 2000.
I must leave tonite (East Coast) but will be here tomorrow.

Will try to replicate the "Disable Macros" & tell you
exactly what I did. It did work. Will try your technique
tomorrow, & re-post results here.

Thanks again... Bob
 
B

Bob Barnes

Trevor - I have replicated the scenario, & Yes, your
solution below does work.

After I had sent my original reply, I realized it
wasn't "File - Delete". I get the same result as the
Project Rxplorer technique by...

"Alt-F11" - "File - Remove Module1." Then...
Do you want to export Module1 before removing it?

Thank you again, Bob
 
Top