I'm cropping the values from one worksheet to another. The clipping is done without problems, the data is going to the clipboard, but I am not able to paste.
Code
Private Sub CommandButton1_Click()
Dim raizen As String
Dim contador As Integer
contador = TextBox2.Value
If TextBox1.Text = "" Then
MsgBox ("Informe um valor")
Exit Sub
Else
raizen = TextBox1.Text
End If
With Sheets("Plan1").Range("A:A")
Set c = .Find(raizen, LookIn:=xlValues, LookAt:=xlWhole)
ActiveCell.EntireRow.Cut
End With
Sheets("Plan2").Select
Sheets("Plan2").Range("A1").Select
Do Until ActiveCell.Value = ""
ActiveCell.Offset(1, 0).Select
contador = TextBox2.Value + 1
Loop
If ActiveCell.Value = "" Then
Worksheets("Plan2").Rows(contador).PasteSpecial Paste:=xlPasteValues
End If
TextBox2.Value = contador
End Sub