Hi All, hope you are ok.
I am struggling with an error runtime error "1004" which keeps on occuring when the macro runs, I protected a the master sheet and have a macro to currently copy the sheet and match the entered cell value to an exsisting sheet within the workbook.
Current code is:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim sh As Worksheet
If Target.Address(0, 0) = "Q7" Then
On Error Resume Next
Set sh = Worksheets(Target.Value)
On Error GoTo 0
If Not sh Is Nothing Then
Cells.Copy sh.Cells
Else
MsgBox Target.Value & " does not exist"
End If
End If
End Sub
Hope some body can help.
Many thanks
Andrew
Bookmarks