VBA can import code from a text file like this:

Sub test()

Dim VBProj As VBProject
Dim VBComp As VBComponent
Dim VBCodeMod As CodeModule
Dim strFile As String

Set VBProj = ThisWorkbook.VBProject
Set VBComp = VBProj.VBComponents("SubsFromFile")
Set VBCodeMod = VBComp.CodeModule
strFile = "C:\codetester.txt"

VBCodeMod.AddFromFile strFile

End Sub