• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How can I copy module from one workbook to anther using VBA code?

Saroj

New Member
Hi Expert,
How can I copy module from one workbook to anther using VBA code? Please advise with an example file.
 
If you follow instruction given on the site step by step, it will work.

Especially portion below is critical for the code to work.
"In the VBE Editor set a reference to "Microsoft Visual Basic For Applications Extensibility 5.3" and to "Microsoft Scripting Runtime" and then save the file."

If you are not familiar with setting reference see link below:
http://excel-macro.tutorialhorizon.com/vba-excel-reference-libraries-in-excel-workbook/
http://www.cpearson.com/excel/missingreferences.aspx

If you are having issues after going through above, upload both the source file and destination file.
 
Hi,
I want to copy Module1 from Test1 workbook to Test2 workbook.
Both files are in same folder.
Path of these file is"C:\Users\Saroj_Kumar\Desktop\Saroj\Test1.xlsm" and "C:\Users\Saroj_Kumar\Desktop\Saroj\Test2.xlsm"
 

Attachments

  • Test1.xlsm
    19.9 KB · Views: 12
  • Test2.xlsm
    8.2 KB · Views: 7
Last edited:
Back
Top