The following example creates a file named test.bas and uses the Export method to copy the contents of the VBComponents(1) code module into the file.
test.bas
VBComponents(1)
Application.VBE.ActiveVBProject.VBComponents(1).Export("test.bas")