Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
mcm mcm is offline
external usenet poster
 
Posts: 2
Default how can i delete a macro

I'm currently working on a worksheet which was suppose to not have
macros in it. When I checked whatever macros there were in that
worksheet I noticed that there was one. I tried to delete it but the
'Delete' button is not activated. When I tried to run the macro, excel
returned an error message telling me that the link to this macro cannot
be found or somethin' like that. How can i clean up that macro list in
excel?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default how can i delete a macro

Go into the VBE (alt+F11), look at the project explore (Ctrl+R), if you have
an entry Modules under your workbook, then expand that and right click on
each module and select Remove. You can decline to prompt to export it.

double click on each entry for sheet
click in the resulting module, do Ctrl + a, then delete key, click the X in
the upper right corner of the module.

do this for the ThisWorkbook entry as well.

Now go back to excel and save the workbook.

--
Regards,
Tom Ogilvy


"mcm" wrote in message
...
I'm currently working on a worksheet which was suppose to not have
macros in it. When I checked whatever macros there were in that
worksheet I noticed that there was one. I tried to delete it but the
'Delete' button is not activated. When I tried to run the macro, excel
returned an error message telling me that the link to this macro cannot
be found or somethin' like that. How can i clean up that macro list in
excel?



  #3   Report Post  
Posted to microsoft.public.excel.programming
mcm mcm is offline
external usenet poster
 
Posts: 2
Default how can i delete a macro

Hi Tom

While I was able to delete all macros in the workbook,
there is still one 'macro' that can't seem to be deleted.
There are no more modules present in the worksheet but
when I pop up the Tools - Macro - Macros window, there
is still one macro remaining but I can't delete or remove
it from the list. When i click 'Run' I get an error
window that says 'Reference is not valid'.

Would appreciate some more advise on this.

Thanks

mcm


-----Original Message-----
Go into the VBE (alt+F11), look at the project explore

(Ctrl+R), if you have
an entry Modules under your workbook, then expand that

and right click on
each module and select Remove. You can decline to prompt

to export it.

double click on each entry for sheet
click in the resulting module, do Ctrl + a, then delete

key, click the X in
the upper right corner of the module.

do this for the ThisWorkbook entry as well.

Now go back to excel and save the workbook.

--
Regards,
Tom Ogilvy


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default how can i delete a macro

A vba macro can only exist in a module. You might have an Excel 4 type
macro on a macro sheet.

for each sh in activeworkbook.worksheets
sh.Visible = True
Next

Run the above from another workbook. If should make all sheets in the
workbook visible and expose any macro sheets.

either that, or you workbook might be getting corrupted would be my best
guess.

--
Regards,
Tom Ogilvy

"mcm" wrote in message
...
Hi Tom

While I was able to delete all macros in the workbook,
there is still one 'macro' that can't seem to be deleted.
There are no more modules present in the worksheet but
when I pop up the Tools - Macro - Macros window, there
is still one macro remaining but I can't delete or remove
it from the list. When i click 'Run' I get an error
window that says 'Reference is not valid'.

Would appreciate some more advise on this.

Thanks

mcm


-----Original Message-----
Go into the VBE (alt+F11), look at the project explore

(Ctrl+R), if you have
an entry Modules under your workbook, then expand that

and right click on
each module and select Remove. You can decline to prompt

to export it.

double click on each entry for sheet
click in the resulting module, do Ctrl + a, then delete

key, click the X in
the upper right corner of the module.

do this for the ThisWorkbook entry as well.

Now go back to excel and save the workbook.

--
Regards,
Tom Ogilvy




  #5   Report Post  
Posted to microsoft.public.excel.programming
mcm mcm is offline
external usenet poster
 
Posts: 1
Default how can i delete a macro

I will try this Tom and keep you posted.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro warning - how to delete macro GavinS Excel Worksheet Functions 3 April 1st 09 01:45 PM
delete a macro that isn't in macro list Jane Makinson Excel Discussion (Misc queries) 3 March 13th 06 01:10 PM
How can I delete a macro when the Delete button is not active? FCR Excel Worksheet Functions 0 March 9th 06 09:43 AM
VBA, delete all macro Danny Excel Worksheet Functions 3 January 27th 06 06:13 PM
How do i delete a macro in Excel 2003 when delete isn't highlight Abel Excel Discussion (Misc queries) 2 September 13th 05 04:09 AM


All times are GMT +1. The time now is 08:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"