I know this should be a simple question to answer, but I'm starting to program in VBA now. The code below should transfer the data from one worksheet to another, it should be something very simple, but it gives compilation error.
Sorry if I used any commands that do not exist in VBA, but I'm really here to learn.
( Code is associated with a button )
Sub Submit()
Dim rLast As Long
With Sheets("Plan2")
.Cells("B", 2).Select.Copy
End With
With Sheets("database")
'Obtém a última linha da Planilha:
rLast = .Cells(.Rows.Count, 1).End(xlUp).Row + 1
.Cells(rLast, 1).Select.Paste
End With
End Sub