· 

Load VBA code from a text file

If you want to import source code from a text file, you can use the following code.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
Sub fromTextFile()
Dim CodeModul As CodeModule
Dim i As Integer
Const Importfile = "c:\Macro.txt"

Set CodeModul = ThisWorkbook.VBProject.VBComponents("NewModule").CodeModule

With CodeModul
  .AddFromFile Importfile
End With

End Sub

author.


I am Tobias, I write this blog since 2014, you can find me on twitter and youtube. If you want you can leave me a paypal coffee donation. You can also contact me directly if you want.

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.


SAP Analysis for Office - The Comprehensive Guide
The book SAP Analysis for Office - The Comprehensive Guide by Tobias Meyer is a pdf book about SAP Analysis for Office. It is based on Analysis for Office 2.8 and contains 346 Pages.
45,00 €
SAP Analysis for Office - The Comprehensive Guide
SAP Analysis for Office - The Comprehensive Guide is a pdf book about SAP BusinessObjects Analysis for Office. It is based on Analysis for Office 2.7 and contains 299 Pages.
37,00 €

Write a comment

Comments: 0