If you want to import source code from a text file, you can use the following code.
Dim CodeModul As CodeModule
Dim i As Integer
Const Importfile = "c:\Macro.txt"
Set CodeModul = ThisWorkbook.VBProject.VBComponents("NewModule").CodeModule
These posts might also be interesting:
You want to know SAP Analysis Office in a perfect detail?
You want to know how to build an Excel Dashboard with your Query in Analysis Office?
You want to know how functions in SAP Analysis Office works?
Then you have to take a look into Analysis Office - The Comprehensive Guide.