I am trying to copy and paste a worksheet from one workbook that the user opens and paste it into another workbook in order to manipulate the data. The code is below:



Private Sub JournalEntryTab_Click()

' This will open the data file selected and copy it into the template.

Dim filename As Variant

filename = application.GetOpenFilename("Excel Files (*.xls), *.xls")

If filename <> False Then
MsgBox "Open " & filename
Workbooks.Open filename
End If


' Copy and Past journal entry data into template worksheet
Sheets("Report 1").Copy
Windows("Depreciation Trend Monthly Template.xls").Activate
Cells.Select
Sheets("Depreciation Accum Detail").Paste ******This is where it errors******

Thanks for any help!