I am trying to copy data from macro enabled Excel sheet to simple Excel file. But following code is throwing error like object not found.
I am writing VBA code in sheet having one more macro for some other functionality.
Private Sub CommandButton2_Click()
Workbooks("JHG raw data.xlsm").Worksheets("Summary").Range("A1:D300").Copy_
Workbooks("JHG summary.xlsx").Worksheets("Data").Range ("A1")
End Sub
.Copy_
must have a space before the underscore).Copy _
– Pᴇʜ