When I copy the contents of a shorter table into a longer table, the leftovers remain at the bottom.
What I'm trying to achieve:
1. I copy the contents of Table1 into Table2 (for example, 30 records each).
2. I do work on Table2 that makes it shorter by removing duplicates, say I remove 5 records so now Table2 is 25 records long.
3. I copy Table 2 back into Table1.
4. The last five records of the original Table1 remain at the bottom of the table.
5. Ultimate question: How do I make the paste function replace the whole table rather than just the top 25 records?
Code that copies but leaves a residue...
What I'm trying to achieve:
1. I copy the contents of Table1 into Table2 (for example, 30 records each).
2. I do work on Table2 that makes it shorter by removing duplicates, say I remove 5 records so now Table2 is 25 records long.
3. I copy Table 2 back into Table1.
4. The last five records of the original Table1 remain at the bottom of the table.
5. Ultimate question: How do I make the paste function replace the whole table rather than just the top 25 records?
Code that copies but leaves a residue...
VBA Code:
ThisWorkbook.Sheets("Control Center").Range("AllData").Copy
Workbooks("US Support Schedule Form.xlsx").Sheets("Form1").Range("Table1").PasteSpecial xlPasteValues