Thread: Copy a macro
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Copy a macro

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)

"pauluk " wrote in message
...
Hi,

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


---
Message posted from http://www.ExcelForum.com/