You cannot access the VBA environment programmatically (e.g. import VBA modules, forms, etc.) unless you give trusted access to the VBA project object model. Every user who is supposed to use the procedure would have to enable that access manually, as it cannot be granted programmatically. Giving trusted access to the VBA project object model on even one PC renders every PC on the network susceptible to macro viruses and is not to be recommended except for the very brief period such access is actually required.
I suggest you rethink whatever it is you're trying to achieve.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|