I have a dataframe from R that I need to paste into the first empty row of an open Excel spreadsheet.
I have tried numerous things.
This code throws a "Run-time error '1004': Application-defined or object-defined error".
Dim NextRow As Range
Set NextRow = Range("B" & Sheets("TC-9").UsedRange.Rows.Count + 1)
Worksheets("TC-9").Range("A" & NextRow).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
I also tried using xlUp to look from the bottom up to find the first empty row.
Cells(Range("C1000000000").End(xlUp).Row + 1, 3).PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False