Importing .frm and .bas files using code
Hi,
i'm trying to make a word document that when opened installs (imports) the macros into the computer, but i've been trying to use the code bellow and kept getting the error "Method 'Import' of object'_VBComponents failed". could you help me out, please?
i've wanted to do this from Excel as i have other installs there as well and it would've been easier to do it from only one file, but it doesn't work.
code:
ActiveDocument.VBProject.VBComponents.Import Environ("SystemDrive") & Environ("HomePath") &...........
thanks in advance!
|