Hallo zusammen,
ich möchte bestimmmte Zeilen kopieren und mit formatierung und Formeln einfügen, das klappt soweit =) Nun möchte ich aber zusätzlich, dass die übernommenen Werte der Spalten D-J aus den eingefügten Zeilen entfernt werden.
Ich hoffe ihr könnt mir helfen =)
Sub VorlageAP()
Application.CutCopyMode = False
Dim X 'Position Button erfassen und speichern
Set X = ActiveSheet.Shapes(Application.Caller)
Range(X.TopLeftCell.Address).Select
'Cells(73, 1).Select
Dim XRow As Integer
Dim XColumn As Integer
XRow = ActiveCell.Row
XColumn = ActiveCell.Column
ActiveSheet.Unprotect
Cells(XRow - 22, XColumn).Rows("1:22").EntireRow.Select
Selection.Copy
Selection.Insert Shift:=xlDown
Selection.EntireRow.Hidden = False
Application.CutCopyMode = False
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowInsertingColumns:=True, AllowInsertingRows _
:=True, AllowInsertingHyperlinks:=True, AllowDeletingColumns:=True, _
AllowDeletingRows:=True, AllowSorting:=True, AllowFiltering:=True, _
AllowUsingPivotTables:=True
ActiveSheet.EnableOutlining = True
Range(X.TopLeftCell.Address).Select
End Sub
|