Hello everybody,

This is my first post, so I want to greet you all and introduce myself. I'm new to this VBA stuff. I had recorded macros before, but the first time I opened the VBE window was actually 3 days ago, and I've been learning the basics ever since. The problem I encountered is:

I have a first worksheet called "Database" where several tables (same columns, but different number of rows and content) are stored. ('Table1', 'Table2', 'Table3'...):
Captura.PNG
Then, a second worksheet "WorkTable" where only a global table is stored, 'GlobalTable'. That 'GlobalTable' is set to store combined data from the tables from the database:
Captura4.PNG

The basic operation I want to do is adding, for instance, 'Table1' below 'GlobalTable'.This is the code I used:

 
Sub AddTable()

    Dim nRows As Integer
    Dim lastRow As Integer
    Dim i As Integer
    
    lastRow = Range("GlobalTable[#All]").Rows.Count
    nRows = Sheets("Database").Range("Table1").Rows.Count
    
    Sheets("Database").Range("Table1").Copy
    Sheets("WorkTable").Select
    
    For i = 1 To nRows
    ActiveSheet.ListObjects("GlobalTable").ListRows.Add
    Next i
    
    Cells(lastRow + 1, 1).PasteSpecial xlPasteValues

End Sub
First I store how many rows my 'GlobalTable' has. Then I store how many rows the table I want to add has, in this case 'Table1'. Then I add this number of empty rows below 'GlobalTable'. Then I copy and paste the 'Table1', and when pasting the following error pops up: error 1004 pastespecial method of range class failed

This is the desired result:
Captura3.PNG

I would appreciate any help on how to solve this, tips of other ways of coding this, and some explanation on why my code doesn't work!

Thank you all for your time.