Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

deleting modules

Status
Not open for further replies.

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
 
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
 
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
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top