Hello,
Please tell me where I went wrong..
I have 3 sheets. I'm trying to copy the content of table1 in sheet1 to table 3 in sheet3 and then copy content from table2 sheet2 to the end of table3 in sheet3...
Please tell me where I went wrong..
I have 3 sheets. I'm trying to copy the content of table1 in sheet1 to table 3 in sheet3 and then copy content from table2 sheet2 to the end of table3 in sheet3...
Code:
Sub Button1_Click()
Application.ScreenUpdating = False
Dim copySheet As Worksheet
Dim pasteSheet As Worksheet
Dim LastRow As Long
Set pasteSheet = Worksheets("Sheet3")
'first copy
Set copySheet = Worksheets("Sheet1")
copySheet.Range("table1").Copy Destination:=pasteSheet.Range("table3")
'move to the next empty row
LastRow = pasteSheet.Range("table3").End(xlUp).Row
'second copy
Set copySheet = Worksheets("Sheet2")
copySheet.Range("table2").Copy Destination:=pasteSheet(3).Range("table3")
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub