Dear Anthony, I believe this macro should only run on the protected sheet, because it has the syntax:- ActiveSheet.Unprotect
Give the consideration on this area and you might be able to solve your problem. Best Regards, -- DILIP KUMAR PANDEY MBA-HR,B COM(Hons.),BCA Mobile: +91 9810929744 dilipan...@gmail.com dilipan...@yahoo.com New Delhi - 110062 On 12/18/09, Anthony <aksaund...@affiniongroup.com> wrote: > > I am trying to copy a range of cells, paste the range of cells into > the same worksheet, and then delete the values in some of the cells. > The values in these cells will vary from week to week. The values in > all the other cells are either data that will not change (names) or > the result of formulas. The following code was created using the > record macro with relative references turned on and it works the first > time I run it. After that it does not work. Can anyone help? > > Sub Macro3() > ' > ' Macro3 Macro > ' > ' Keyboard Shortcut: Ctrl+n > ' > ActiveSheet.Unprotect > ActiveCell.Offset(-8, 0).Range("A1:J7").Select > Selection.Copy > ActiveCell.Offset(8, 0).Range("A1").Select > Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, > SkipBlanks:= _ > False, Transpose:=False > ActiveCell.Offset(2, 3).Range("A1:C5").Select > Application.CutCopyMode = False > Selection.ClearContents > ActiveSheet.Protect DrawingObjects:=True, Contents:=True, > Scenarios:=True > End Sub > > -- > > ---------------------------------------------------------------------------------- > Some important links for excel users: > 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at > http://www.excelitems.com > 2. Excel tutorials at http://www.excel-macros.blogspot.com > 3. Learn VBA Macros at http://www.vbamacros.blogspot.com > 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com > > > To post to this group, send email to excel-macros@googlegroups.com > If you find any spam message in the group, please send an email to: > Ayush Jain @ jainayus...@gmail.com or > Ashish Jain @ 26may.1...@gmail.com > <><><><><><><><><><><><><><><><><><><><><><> > HELP US GROW !! > > We reach over 6,500 subscribers worldwide and receive many nice notes about > the learning and support from the group. Our goal is to have 10,000 > subscribers by the end of 2009. Let friends and co-workers know they can > subscribe to group at > http://groups.google.com/group/excel-macros/subscribe -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com or Ashish Jain @ 26may.1...@gmail.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 6,500 subscribers worldwide and receive many nice notes about the learning and support from the group. Our goal is to have 10,000 subscribers by the end of 2009. Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe