VBA to copy Module from one Excel Workbook to another Workbook

前端 未结 5 1856
猫巷女王i
猫巷女王i 2020-12-29 12:16

I am trying to copy a module from one excel workbook to another using VBA.

My Code:

\'Copy Macros

Dim comp As Object
Set comp = ThisWorkbook.VBProje         


        
5条回答
  •  隐瞒了意图╮
    2020-12-29 13:12

    Shai Rado's method of export/import has the advantage that you can split them, i.e. export the module from the source workbook as one step and then import them into multiple target files!

提交回复
热议问题