Nov 2, 2006 #1 rgandy Technical User Nov 17, 2005 38 US hey all, how can i delete a module from within the code? i am trying vba.project.arrayname but there doenst seem to be any deletion functionality thanks
hey all, how can i delete a module from within the code? i am trying vba.project.arrayname but there doenst seem to be any deletion functionality thanks
Nov 2, 2006 #2 PHV MIS Nov 8, 2002 53,708 FR Have you tried the VBIDE.VBComponents.Remove method ? Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
Have you tried the VBIDE.VBComponents.Remove method ? Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
Nov 2, 2006 Thread starter #3 rgandy Technical User Nov 17, 2005 38 US thank you. do i need to add the name of hte module to that string of code? i am getting an "object required" error message upon execution when i place that line of code into the project Upvote 0 Downvote
thank you. do i need to add the name of hte module to that string of code? i am getting an "object required" error message upon execution when i place that line of code into the project
Nov 2, 2006 #4 PHV MIS Nov 8, 2002 53,708 FR A starting point: With Workbooks("yourWorkbook").VBProject .VBComponents.Remove (.VBComponents("yourModule")) End With Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
A starting point: With Workbooks("yourWorkbook").VBProject .VBComponents.Remove (.VBComponents("yourModule")) End With Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
Nov 2, 2006 #5 firefytr Technical User May 18, 2004 1,130 US About everything you wanted to know about working with modules programmatically... http://www.cpearson.com/excel/vbe.htm Here is a useful Knowledge Base entry at VBAX... http://vbaexpress.com/kb/getarticle.php?kb_id=397 Regards, Zack Barresse Simplicity is the ultimate sophistication. What is a MS MVP? PODA - Leonardo da Vinci Upvote 0 Downvote
About everything you wanted to know about working with modules programmatically... http://www.cpearson.com/excel/vbe.htm Here is a useful Knowledge Base entry at VBAX... http://vbaexpress.com/kb/getarticle.php?kb_id=397 Regards, Zack Barresse Simplicity is the ultimate sophistication. What is a MS MVP? PODA - Leonardo da Vinci