View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
bsnapool[_6_] bsnapool[_6_] is offline
external usenet poster
 
Posts: 1
Default PLEASE HELP! Copy sheet with password protected cells debug error


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

--
bsnapoo
-----------------------------------------------------------------------
bsnapool's Profile: http://www.excelforum.com/member.php...fo&userid=3611
View this thread: http://www.excelforum.com/showthread.php?threadid=55982