>>>Could someone enlighten me as to when you would ever want to add a standard code module to an ActiveX Dll?
>>
>>When you want to share a property between all the instances of a component.
>>
>>Note that the same condition also applies to ActiveX EXE.
>
>I guess you can share subroutines and functions as well.
Of course you can but there isn't no real advantage of doing so.
Let me explain:
-Properties in a class have there own memory space for each instance of a class.
-Properties (or variables) in a standard module in a component are loaded once for every instances of this class.
-Methods (sub & function) declared in a class are already stored in a shared space in memory because code in these aren't particular to an instance. That's why I say that there is no advantage!
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com