Quote Originally Posted by Simon Lloyd
You need to set an reference to the VBA Extensibililty library. The library contains the definitions of the objects that make up the VBProject. In the VBA editor, go the the Tools menu and choose References. In that dialog, scroll down to and check the entry for Microsoft Visual Basic For Applications Extensibility 5.3.
I have never found a need to do that. Everyone says that you should, but I always find that it works fine without, probably because VBA has an implicit reference within itself.