Sub CopyModule()
On Error Resume Next
Dim FolderName As String, wbName As String
FolderName = ActiveWorkbook.Path
wbName = Dir(FolderName & "\" & "*.xls")
Application.ScreenUpdating = False
While wbName <> ""
If wbName <> "Tonghop.xls" Then
ThisWorkbook.VBProject.VBComponents("Module1").Export "Module1.bas"
Workbooks.Open ActiveWorkbook.Path & "\" & wbName
With Workbooks(wbName).VBProject
.VBComponents.Import "Module1.bas"
.VBComponents("Module1").Name = "MyModule"
End With
Application.DisplayAlerts = False
Workbooks(wbName).Close SaveChanges:=True
End If
wbName = Dir
Wend
Kill "Module1.bas"
Application.ScreenUpdating = True
End Sub