Macros aus Textdatei in Excelmappe
25.01.2022 13:35:30
Vincent
mit diesem Befehl füge ich ein Modul per VBA in eine Excel Arbeitsmappe ein:
Sub Modul_Vorwert_einfügen()
On Error Resume Next
Dim VBKomp As VBComponent
Set VBKomp = ActiveWorkbook.VBProject.VBComponents.Add(vbext_ct_StdModule)
VBKomp.Name = "ModulVorwert"
VBKomp.codeModule.AddFromFile ("K:\GCLabor\Macros\Excel-Macros für Labor Heppeler\Pharmabefunde\diese Macro nie löschen\ModVorwerte.txt")
On Error GoTo 0
Application.Visible = True
End Sub
Kann man so ähnlich eine Textdatein auch in "Diese Arbeitsmappe" / Workbook_BeforeClose hineinkopieren?vielen Dank für eure Hilfe
Vincent Breith
Anzeige