Here's a page with some tips on programming within VBE:
http://www.cpearson.com/excel/vbe.htm
For example, if I run the code below in a newly opened workbook, it
will list the names of all the standard modules for all of the open
workbooks (including add-ins!). If there are no other open workbooks,
you'll just get the add-ins you have active. I think all you'd need
to do is change append of the module name to the "Msg" string to be an
export of the module from "oComponent" and an import into
"ThisWorkBook...". There are examples of that on the web page I cited
above.
===============================================================
Sub ListStandardModules()
' Needs "Microsoft VBS Extensibility" reference
Dim oComponent As VBComponent
For Each oProject In Application.VBE.VBProjects
If oProject.Name <> ThisWorkbook.VBProject.Name Then
If oProject.Protection = False Then
Msg = Msg & "-------->" & oProject.Name & Chr(13)
For Each oComponent In oProject.VBComponents
If oComponent.Type = vbext_ct_StdModule Then
Msg = Msg & oComponent.Name & Chr(13)
End If
Next oComponent
End If
End If
Next oProject
MsgBox Msg
End Sub