VBA x mal einfuegen in anderes blatt
09.10.2018 14:38:21
Raimund
Mit dem Code tue ich im Sheet 1 Bereich auswaehlen und ins Sheet 2 einfuegen.
Ich moechte aber, dass das kopierte Bereich im Sheet 2 z.B. 5 mal untereinander eingefuegt wird. Kann man das so realisieren?
Vielen Dank im Voraus
Gruss Raimund
Sub Copy_Selected()
Application.ScreenUpdating = True
Dim UserRange As Range
Prompt = "Please Make Your Selection"
Title = "Select Your Range"
' Display the Input Box
On Error Resume Next
Set UserRange = Application.InputBox(Prompt:=Prompt, Title:=Title, _
Default:=ActiveCell.Address, Type:=8) 'Range selection
' Was the Input Box canceled?
If UserRange Is Nothing Then
MsgBox "Canceled."
End If
UserRange.Copy
Sheets("Sheet2").Cells(Rows.Count, 2).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Application.CutCopyMode = False
End Sub