steve400243
Active Member
- Joined
- Sep 15, 2016
- Messages
- 429
- Office Version
- 365
- 2016
- Platform
- Windows
Hello, I use this macro to copy and Paste from WS1 to WS2. But I need it to copy and paste new data on the next row down on Ws2 When the button is selected. I cant figure this out. Thanks for all help provided.
Code:
Sub ButtonCode()
Dim ws1 As Worksheet, ws2 As Worksheet
Dim DestRow As Long
Set ws1 = Sheets("Cartage Rate")
Set ws2 = Sheets("Complete")
DestRow = ws2.Cells(Rows.Count, "A").End(xlUp).Row + 1
ws1.Range("B3").Copy ws2.Range("B" & DestRow)
ws1.Range("C3").Copy ws2.Range("C" & DestRow)
ws1.Range("D3").Copy ws2.Range("D" & DestRow)
ws1.Range("E3").Copy ws2.Range("E" & DestRow)
ws1.Range("F3").Copy ws2.Range("F" & DestRow)
ws1.Range("D19").Copy ws2.Range("G" & DestRow)
ws1.Range("E19").Copy ws2.Range("H" & DestRow)
ws1.Range("F19").Copy ws2.Range("I" & DestRow)
End Sub