Hi,
I want to copy a range and paste it several times via a user form using a text box. It already works fine but I can only copy and paste that range once. I want to paste it as many times as the user wants with the textbox input.
Thats my code at the moment.
I would apreciate some help. Thanks!
Edit: it is working with 1x paste but if I delete those 2 lines
Dim entradas As Integer
TextBox1.Value = entradas
There are in the code cause I was trying to find a solution :D
I want to copy a range and paste it several times via a user form using a text box. It already works fine but I can only copy and paste that range once. I want to paste it as many times as the user wants with the textbox input.
Thats my code at the moment.
I would apreciate some help. Thanks!
VBA Code:
Private Sub CommandButton1_Click()
Dim entradas As Integer
TextBox1.Value = entradas
If TextBox1.Value > 0 Then
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Title = Application.ActiveWorkbook.Name
Worksheets("Bausteine").Activate
Range("A3:Q3").Select
Selection.Copy
Worksheets("F-Kalk").Activate
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False
FindReplace
Application.DisplayAlerts = True
Application.ScreenUpdating = True
Exit Sub
Else
Exit Sub
End If
End Sub
Edit: it is working with 1x paste but if I delete those 2 lines
Dim entradas As Integer
TextBox1.Value = entradas
There are in the code cause I was trying to find a solution :D
Last edited by a moderator: