W
wilsoj
Hi,
Very new to VBA and having trouble with a simple macro running in 2003
that copies and pasts to another worksheet. Code as follows:
Private Sub CopyResults_Click()
'Select the filtered data and copy it
Range("A23").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Range("F19").Select
' Open the template and copy in the data
Workbooks.Open Filename:="C:\Athens Verification
Data\Templates\Verification Template.xls"
Workbooks("Verification Template.xls").Activate
ActiveSheet.Range("A1").Select
*ActiveSheet.Paste*
ActiveSheet.Range("A1").Select
Application.CutCopyMode = False
End Sub
When I run CopyResults, the sheet is opened and the data copied
correctly, but I get a runtime error 1004 past method of worksheet
class failed, with the line 'ActiveSheet.Paste' highlighted. Don't get
this when I run the same macro in 2000.
Have looked for a solution online but no joy. Be grateful for any
advice!
Many thanks,
Jane
Very new to VBA and having trouble with a simple macro running in 2003
that copies and pasts to another worksheet. Code as follows:
Private Sub CopyResults_Click()
'Select the filtered data and copy it
Range("A23").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Range("F19").Select
' Open the template and copy in the data
Workbooks.Open Filename:="C:\Athens Verification
Data\Templates\Verification Template.xls"
Workbooks("Verification Template.xls").Activate
ActiveSheet.Range("A1").Select
*ActiveSheet.Paste*
ActiveSheet.Range("A1").Select
Application.CutCopyMode = False
End Sub
When I run CopyResults, the sheet is opened and the data copied
correctly, but I get a runtime error 1004 past method of worksheet
class failed, with the line 'ActiveSheet.Paste' highlighted. Don't get
this when I run the same macro in 2000.
Have looked for a solution online but no joy. Be grateful for any
advice!
Many thanks,
Jane