As people have mentioned in the comments, you need to remove the On Error Resume Next
because it prevents the error message from appearing.
You also cannot use Workbook.Worksheet.Selection
, this plains does not exists.
So, assuming you have the macro in the destination workbook, your function could (but shouldn't!) look like that:
Private Sub PasteCorrection()
Selection.Copy
ThisWorkbook.Worksheets(1).Range("C7").Select
ActiveSheet.Paste
End Sub
No it shouldn't look like that because as another commenter said, you should avoid selections as much as possible. The function below will achieve the same but much faster and without hitting the clipboard.
Private Sub PasteCorrection()
ThisWorkbook.Worksheets(1).Range("C7").Value = Selection.Value
End Sub
Even better, if you know the range that the ranges are the same you could use the following:
Private Sub PasteCorrection()
ThisWorkbook.Worksheets(1).Range("C7").Value = Workbooks(2).Worksheets(1).range("C7").Value
End Sub
You should of course adapt the "C7" to match your specific needs.
UPDATE
If the macro is inside the VBA of the origin workbook then the code should be different. Assuming that you know the file name of the destination workbook.
Private Sub PasteCorrection()
Selection.Copy
Workbooks("FileNameWithoutExtension").Worksheets(1).Paste
End Sub
If you do not know the name of the destination BUT you have only two workbooks opened:
Private Sub PasteCorrection()
Selection.Copy
If ThisWorkbook Is Workbooks(1) Then
Workbooks(2).Worksheets(1).Paste
else
Workbooks(1).Worksheets(1).Paste
End If
End Sub