Copy a macro

P

pauluk

Hi,

I need to create a macro which will copy another macro to anothe
workbook. How can you go about this
 
B

Bob Phillips

Simplest way is to copy the code to a text file and copy it in the other
workbook with

ActiveWorkbook.VBProject.VBComponents("Module1") _
.CodeModule.AddFromFile "C:\myTEst\volker1.xls"

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Top