Nov 2, 2006 #1 rgandy Technical User Joined Nov 17, 2005 Messages 38 Location 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 Joined Nov 8, 2002 Messages 53,708 Location 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 Joined Nov 17, 2005 Messages 38 Location 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 Joined Nov 8, 2002 Messages 53,708 Location 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 Joined May 18, 2004 Messages 1,130 Location 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