| VBA-Beispiel 061 | |
|
|
|
kopiert ein Modul in eine neue Exceldatei |
|
| kopiert Modul1 aus dieser Datei in eine neue Arbeitsmappe. | |
|
Sub Modul_in_neue_Datei_exportieren() 'Modul1 dieser Mappe in neue Datei exportieren Dim Pfad As String Pfad = ThisWorkbook.Path & "\Modul1.bas" 'Modul1 aus dieser Mappe exportieren Application.VBE.ActiveVBProject.VBComponents("Modul1").Export Pfad Workbooks.Add 'Modul1 in neue Mappe importieren With ActiveWorkbook Application.VBE.ActiveVBProject.VBComponents.Import Pfad End With 'Kopie von Modul1 löschen Kill Pfad MsgBox "Modul in neue Mappe kopiert", , "" End Sub |
|
|
Download: vba061.zip |
|
relevante Links:
|
|
| |