ich möchte untenstehenden Code verwenden, jedoch sollen in der Kopie nur noch die Werte stehen und keine Formeln.
Kann man diesen evtl. anpassen?
Wäre schön wenn mir jemand einen Tipp geben könnte.
Danke schonmal vorab für eure Unterstützung.
VG Michael
Sub FactsheetKopieFuerAblage()
Dim Quelle As Workbook
Dim Ziel As Workbook
Dim Dialog As FileDialog
Dim Blatt As Worksheet, X&
Application.ScreenUpdating = False
Set Quelle = ThisWorkbook
Set Blatt = Quelle.ActiveSheet
Set Dialog = Application.FileDialog(msoFileDialogFilePicker)
With Dialog
.Title = "Bitte Zieldatei wählen"
.AllowMultiSelect = False
If .Show > -1 Then
MsgBox "Vorgang abgebrochen", vbInformation
Exit Sub
Else:
Set Ziel = Workbooks.Open(.SelectedItems(1))
End If
End With
For X = 1 To Ziel.Sheets.Count
If Sheets(X).Name = Blatt.Range("D2").Text Then
MsgBox "Blatt existiert schon: " & Sheets(X).Name
Ziel.Close
Exit Sub
End If
Next
With Ziel
Blatt.Copy after:=.Worksheets(.Worksheets.Count)
.Worksheets(.Worksheets.Count).Name = .Worksheets(.Worksheets.Count).Range("D2").Text
.Save
.Close
End With
Application.ScreenUpdating = True
End Sub