If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Deleting Macros

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-08-10, 11:33
roeepa roeepa is offline
Registered User
 
Join Date: Mar 2010
Posts: 28
Deleting Macros

Hi,
I'm trying to delete a macro that i wrote (and dont need anymore) from the file that i'm working on. I know that the macro is still there as each time i open the file i get asked if i want to disable or enable macros, however, when i go to the list of macros, its empty, as if there are no macros in this file.
I'm using Excel 2003.
Any help will be great!
Thanks a lot!
Reply With Quote
  #2 (permalink)  
Old 05-08-10, 11:44
Colin Legg Colin Legg is offline
Registered User
 
Join Date: Sep 2008
Location: London, UK
Posts: 495
In the visual basic editor there will be a standard code module which your macro lived in. Remove it from the project by right clicking on it in the project explorer > Remove module (see screenshot attached). Also go through each of the Excel object modules and clear out any code in them (but don't remove them from the project).
Attached Thumbnails
Deleting Macros-remove-module.png  
__________________
Colin

RAD Excel Blog

Other tutorials:
Array Formulas | Deleting Rows with VBA
Reply With Quote
  #3 (permalink)  
Old 05-08-10, 11:58
roeepa roeepa is offline
Registered User
 
Join Date: Mar 2010
Posts: 28
Thanks a lot! I think that it worked.
I forgot to mention before that each time i tried to copy a graph from the excel worksheet to a power point presentation, after pasting the graph, excel brings up an error message saying: "Error accessing file. Network connection may have been lost". It doesnt happen if i try to copy/paste from a different excel file that didnt have a macro in it.
Is that related somehow to the macro problem that i had?
Thanks again for your help!
Reply With Quote
  #4 (permalink)  
Old 05-11-10, 17:05
Colin Legg Colin Legg is offline
Registered User
 
Join Date: Sep 2008
Location: London, UK
Posts: 495
Hi,
Quote:
It doesnt happen if i try to copy/paste from a different excel file that didnt have a macro in it.
Is that related somehow to the macro problem that i had?
I honestly don't know because it sounds like a fairly obscure Powerpoint issue to me, but I doubt it is directly related to the presence of VBA code within the Excel workbook. I guess you're in the best position to tell because you can experiment by adding/removing the code and copying the graph over? Does a reliable pattern emerge that you only get this error when that code is in the workbook?

Some Powerpoint 2003 users have reported this problem when certain controls are involved, so one thing to check would be if you have any controls on the graph?
Also make sure you have the latest Office service pack and hot fixes downloaded.

A powerpoint expert would be better placed to answer this which I am definitely not!
__________________
Colin

RAD Excel Blog

Other tutorials:
Array Formulas | Deleting Rows with VBA
Reply With Quote
  #5 (permalink)  
Old 05-12-10, 02:01
roeepa roeepa is offline
Registered User
 
Join Date: Mar 2010
Posts: 28
Thanks Colin. After playing with it i think that it has nothing to do with the VBA code... I'll try everyhing you mentioned and hopefully it'll work.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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