How to copy module form one workbook to another
deepakmehta wrote
What i am doing is making a xl. file thrugh vba code in Main.xl and
then saving it as User.xl, now i need to copy one of the modules form
the Main.xl to the User.xl.
Study the code on that site that looks like this:
With ThisWorkbook
FName = .Path & "\code.txt"
..VBProject.VBComponents("Module2").Export FName
End With
ActiveWorkbook.VBProject.VBComponents.Import FName
Kill FName
--
David
|