Hi
I am using cpearsons code to copy modules from one workbook to another workbook. But I am unsucessful to copy codes associated with workbook_open event or workbook_beforesave event. Can anyone help me out in this.
Following code from
http://www.cpearson.com/excel/vbe.htm
is being used
The following procedure will copy Module1 from Book2 to Book1.
Code
Sub CopyOneModule()
Dim FName As String
With Workbooks("Book2")
FName = .Path & "\code.txt"
.VBProject.VBComponents("Module1").Export FName
End With
Workbooks("book1").VBProject.VBComponents.Import FName
End Sub
Display More
I want to copy codes associated with workbook events from Book2 to Book1. Can anyone please help me in this?
Thanks
Ram P