PDA

View Full Version : Deleting Excel macros



Susan B
08-04-2003, 06:15 PM
I give up. I have searched high and low on the internet and am probably using the wrong search terms but you guys always give me answers way quicker even if I do make a twit of myself at times. :D

I have several Excel workbooks that when opened display the "Do you really want to open this with macros running or shall I disable them?" message. The workbooks were not all created by me so I have no idea what the macros are/were supposed to do.

Never mind that, the point is that I cannot actually find any macros in the workbook. If I go to Tools>Macro>Macros and look all through that dialogue box there is nothing there, not in All Open Workbooks, This Workbook or anywhere.

I have looked in the Visual Basic editor (if that is what it is called) but know absolutely nothing about this part of Excel so I would not know what to look for. I did, however, have some success with one workbook by deleting a Module which got rid of the macro popup box. Unfortunately the other workbooks do not have any Modules so the phantom macro must be elsewhere. Any ideas?

Oh, I nearly forgot, this is Excel 97 on a Win 95 old slug. :-)

wuppo
08-04-2003, 07:44 PM
Sometimes 'names' can cause this effect. If you know the sheets don't intentionally use named cells / ranges, try the following:

Create a new workbook, while leaving your 'problem' one loaded.
Make sure your origional workbook is the active one (selected).
Goto Visual Basic (Atl F11)
In the Project Window:
Highlight the 'new' workbook (e.g. VBA Project (Book 2)) and create a new module in it: Insert > Module
Select the Module to display the code window
Paste the following into the code window:

Sub SusanB()
Dim zztop As Name
For Each zztop In Names
zztop.Delete
Next
End Sub

Press F5 to run the sub
Close your workbook and reopen it to see if it is cured. :|

Susan B
08-04-2003, 08:31 PM
Hmmm, interesting-looking witchcraft that one is, wuppo. :D

Thanks, I will give it a go and let you know how I get on. :-)

Russell D
08-04-2003, 09:46 PM
If you already run a good virus checker with ability to scan M$ Office component macros - then just reduce the Excel macro security setting to Low under Tool/Options etc. and you will not see the message again.

Susan B
12-04-2003, 11:07 AM
Hi Wuppo,

I have not had any luck with that spell, the workbook still thinks it has a macro. :-(

There are no "names" in the sheets as far as I can tell - the boss would not know how to create those. :D

I think I will just do as the other person recommended and disable the warnings or, as it is only two workbooks that are doing it, just put up with it.

Thanks for your suggestion anyway, I will file the spell away in case it comes in useful some other time. :-)

godfather
12-04-2003, 11:54 AM
If its not an overly lage spreadsheet, use:

tools-options-general

tick "display formula" and ok out.
That should show up any odd looking detail.
Remember to reverse the operation when you have finished.