B
bsnapool
Hi All, hope you are ok.
I am struggling with an error runtime error "1004" which keeps o
occuring when the macro runs, I protected a the master sheet and have
macro to currently copy the sheet and match the entered cell value to a
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 :mad
I am struggling with an error runtime error "1004" which keeps o
occuring when the macro runs, I protected a the master sheet and have
macro to currently copy the sheet and match the entered cell value to a
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 :mad