0
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 spreadsheet to another, should be something very simple, but gives compilation error.
Sorry if I used some command that does not exist in VBA, but I’m really here to learn.
(The 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