Hello I am new to VBA and stackoverflow.
my program simply selects Table1 and copies it to the end of Table2. The code is as follows.
Sub c_p()
Application.Goto Reference:="Table1"
Selection.Copy
Application.Goto Reference:="Table2"
Selection.End(xlToRight).Select
Selection.End(xlDown).Select
Selection.ListObject.ListRows.Add AlwaysInsert:=False
ActiveSheet.Paste
End Sub
When I run the program, it gives "Run-time Error '1004' ". The error in this line:
ActiveSheet.Paste
I am aware that there are better ways to go about this than using selections and while those are interesting to me I would also like to know the reason for the problem.
Thank you for your help.