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:
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 failedPlease Login or Register to view this content.
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.
Bookmarks