thread181-27567 outlines how to delete a code a module by using vbproject.vbcomponents.Remove() method. I would like to design a subroutine which deletes all macro code from a file. The problem is that vbcomponents contains items like sheets and thisworkbook. When you call remove() on a vbcomponent which is not a code module you get an error. How do you find out the type of vbcomponent you are looking at?
-Venkman
-Venkman