LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro to unlock and lock cells in password protected sheet Chris Excel Discussion (Misc queries) 3 February 26th 10 09:06 PM
no password for protected sheet TJaques Excel Worksheet Functions 3 July 27th 06 05:51 PM
How to Copy a Password Protected Excel Worksheet [email protected] Excel Worksheet Functions 1 October 8th 05 08:02 PM
password protected Sheet thrava Excel Discussion (Misc queries) 4 December 29th 04 07:54 PM
VBa, Password protected sheet fails to get unprotected with the same password Hans Rattink Excel Programming 3 July 28th 03 02:30 PM


All times are GMT +1. The time now is 12:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"