I am trying to set up a button to press have a specific range be copied out of my current workbook and placed into another workbook not open in my computer. The problem I'm having is every time I press the button, the information replaces my last entry. In need to be able to copy it into the other file and have it keep a list. Here's my code:
Private Sub CommandButton1_Click()
Dim wkb1 As Workbook
Dim sht1 As Worksheet
Dim wkb2 As Workbook
Dim sht2 As Worksheet
Application.ScreenUpdating = False
Set wkb1 = ThisWorkbook
Set wkb2 = Workbooks.Open("Scope.xlsx")
lastrow = Workbooks("Scope.xlsx").Sheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Row
Set sht1 = wkb1.Sheets("ASCE")
Set sht2 = wkb2.Sheets("Sheet1")
sht1.Range("L3").Copy
sht2.Range("A" & lastrow).PasteSpecial xlPasteValues
Application.CutCopyMode = False
wkb2.Close True
Application.ScreenUpdating = True
End Sub
Private Sub CommandButton1_Click()
Dim wkb1 As Workbook
Dim sht1 As Worksheet
Dim wkb2 As Workbook
Dim sht2 As Worksheet
Application.ScreenUpdating = False
Set wkb1 = ThisWorkbook
Set wkb2 = Workbooks.Open("Scope.xlsx")
lastrow = Workbooks("Scope.xlsx").Sheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Row
Set sht1 = wkb1.Sheets("ASCE")
Set sht2 = wkb2.Sheets("Sheet1")
sht1.Range("L3").Copy
sht2.Range("A" & lastrow).PasteSpecial xlPasteValues
Application.CutCopyMode = False
wkb2.Close True
Application.ScreenUpdating = True
End Sub