Running A Userform In An Add In

  • I have a large excel-vba file, it's 9 megs. I decided to put the userforms and the modules in the form of an xla.

    I seem to be able to access the code in the modules (subs and functions) but am unable to access the userforms directly from a workbook.

    The question is: if you have an xla that contains userforms, how do you reference them from vba code in another workbook?

    I tried both:

    1. Load "file.xla'!userform1"
    2. 'and
    3. Load userform1

    I have a reference to the xla set in the vba project.

    any ideas?

  • Re: Running A Userform In An Add In

    Not sure on this, would have to have a play around, but a quick fix would be to add a few subs within the addin to show/hide any userforms (like a form of encapsulation) which you could call instead.

    Hope this helps :)