wie kann ich eine Kopie des aktuellen Workbooks (das also die Makro enthält) ohne Makros abspeichern?
Danke im Voraus,
Gruss Florian
Private Sub CommandButton1_Click()
Worksheets("Tabelle1").Copy
ActiveSheet.OLEObjects.Delete
With ActiveSheet.UsedRange
.Value = .Value
End With
With ActiveSheet.Parent.VBProject.VBComponents(ActiveSheet.CodeName).CodeModule
.DeleteLines 1, .CountOfLines
End With
On Error GoTo ERRORHANDLER
ActiveWorkbook.SaveAs Range("B1").Value & "\test.xls"
Exit Sub
ERRORHANDLER:
MsgBox "Die Datei konnte nicht gespeichert werden!"
End Sub