Delete Macro

S

SharonE

I have a file with Macro4, Macro5, Macro6 and Macro7.
When I select Tools >>> Macro >>> Macros, these four macros are displayed
yet the delete button is greyed out.
In the VB editor there are no modules with these macros.
I'd really appreciate anyone who can advise how I can remove these macros.
Thanks
 
D

Dennis Tucker

Need to Protect/Hide Macro/Modules

Posted by Dan on October 15, 2001 10:18 AM
From the Microsoft Web Site, HTH:
You can protect the modules from being viewed by locking the project for
viewing, providing a password, and then saving the file normally.

NOTE: By doing this, you will not be able to save a Microsoft Excel workbook
down to an earlier format.

To protect a module from being viewed, follow these steps (or the
appropriate ones for your version of Excel).

NOTE: The following steps are for Microsoft Excel 97:

In the Visual Basic Editor, click Project Name Properties on the Tools menu,
where Project Name is the name of the project that you are protecting.


Click the Protection tab.

Click to select the Lock Project for Viewing check box. Type a password in
the Password box, and then type the password again in the Confirm Password
box.

Click OK.

On the File menu, click Close and Return To Microsoft Excel.

In Microsoft Excel, click Save.


To view a protected module, follow these steps:
On the Tools menu, point to Macro, and then click Visual Basic Editor.

In the Visual Basic Editor, click the entry for the add-in in the Project
pane.

When you are prompted, type the password for the add-in, and then click OK.


Dennis
 
S

SharonE

I don't want to protect any modules.
I merely want to delete these macros. As stated below,
there are no modules associated with these macros.
 
D

Dave Peterson

The code for macros is located in modules, so I don't understand what "there are
no modules associated with these macros" means.

But if you want to get remove General modules, you can visit Debra Dalgleish's
site:
http://contextures.com/xlfaqMac.html#NoMacros

She also explains how to remove code from the ThisWorkbook module and worksheet
modules. (These can't be removed.)
 
S

SharonE

It means there are absolutely no code or modules associated with these
macros. When I go tools, macros, it displays these macros i.e. Macro4,
Macro5, Macro6, Macro7.
The Delete button is greyed out. The Run, Step Into and Edit buttons are
visible but when you select any of these buttons it returns the message
"Reference is not valid"
So obviously not causing a problem, its just the fact of having them
displayed in the Macro window that I want to rectify.
 

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