wie kann ich ein Klassenmodul in eine bereits geöffnete Arbeitsmappe per VBA kopieren?
Mein Ansatz brachte leider keinen Erfolg:
Auszug (DatName steht hier für den aktuellen DateiNamen):
=======
Sub CLS_Modul_copy()
Dim strPath As String
strPath = Application.Path & "\"
On Error GoTo Errorhandler
ThisWorkbook.VBProject.VBComponents("Tabelle3").Export strPath & DatName _
& ".cls"
...
With ActiveWorkbook.VBProject
.VBComponents.Import strPath & DatName & ".cls"
.VBComponents(DatName).Name = "Tabelle3"
End With
Kill strPath & "\" & DatName & ".cls"
Danke für Hilfe
Gruß anoc