Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel --> Some documents may contain macros....

Status
Not open for further replies.

datadan

IS-IT--Management
Joined
Jul 22, 2002
Messages
283
Location
US
I frequently get "...may contain harmful macros..." prompt when opening some excel workbooks. These were workbooks that at one time had macros, and I have since deleted the macros pertaining to the workbook. However the prompt remains. What must I do to have my workbook open without this problem?

Thanks,
 
Good question. Any Macros that are part of buttons or text boxes do not show in the list of macros. Display the Toolbox Toolbar and click on the set square and then double click on any "object" that are not part of the normal spreadsheet cells, I have used a "sheet" click macro which should be revealed if you are in debug mode and click on the sheet (each one maybe).

Then there is the Auto_open macro. Which is how the "Melissa" virus worked. Not sure if you could find most by opening the macro environment and searching for the words "Sub" and "Function" -

but beware They may have used a function as a "user" command to do things that Excel cannot do any other way inside a cell (Yes I do know at least one)

 
The usual reason for this is that someone has deleted the macro, but not the module that housed it. The very presence of the module, empty or not, will drive that message. Try opening the VBE using ALT+F11. In the Project explorer window (Top left usually), find your project, and you will probably see 2 nodes. One will be entitled Microsoft Excel Objects and the other will be called Modules. Expand Modules, right click on any modules and select 'Remove Module'. When prompted with the Export question hit 'no'. Now ALT+F11 again to come out of the VBE, save the book and you should be done.

Regards
Ken..............
 
Thanks Ken/Crosby

Deleting the modules did the trick!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top