I'm trying to put the following code avalaible in the link u send me, but I
keep getting a compile error user-defined type not defined!
Sub DeleteModule()
Dim VBProj As VBIDE.VBProject
Dim VBComp As VBIDE.VBComponent
Set VBProj = ActiveWorkbook.VBProject
Set VBComp = VBProj.VBComponents("Module1")
VBProj.VBComponents.Remove VBComp
End Sub
Can u help me?
Thanks,
> All explained nicely here:
> http://www.cpearson.com/excel/vbe.aspx
[quoted text clipped - 9 lines]
> >
> > Thanks,
RB Smissaert - 25 Sep 2007 15:33 GMT
Did you set the reference to the VBE Extensibility as explained in that
link?
RBS
> I'm trying to put the following code avalaible in the link u send me, but
> I
[quoted text clipped - 27 lines]
>> >
>> > Thanks,
Gord Dibben - 25 Sep 2007 15:54 GMT
You must have the Visual Basic for Applications Extensibility Libray referenced
under Tools>References.
Chip points this out at the site you were guided to.
Gord Dibben MS Excel MVP
>I'm trying to put the following code avalaible in the link u send me, but I
>keep getting a compile error user-defined type not defined!
[quoted text clipped - 25 lines]
>> >
>> > Thanks,