Thread: Macros?
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
William Horton
 
Posts: n/a
Default Macros?

Are you saying that the cells that the values are trying to be
paste/specialed into are locked? If that is the case, that is why the macro
is failing. You have to unprotect the sheet in order for the paste/special
to work on locked cells. Either you can do it manually before you run the
macro, or you can edit the macro so that it unprotects the sheet and then
reprotects is after it is done.

"Engli360" wrote:



"Richard Buttrey" wrote:

On Fri, 21 Apr 2006 01:34:01 -0700, Engli360
wrote:

Ok I have a worksheet that alot of info is input daily. Each day it is saved
with a new name and there is a macro recorded to delete the previous days
info and then we put in the new info. In some blocks there are numbers that
are copied and put in another block, ie dates and meters. Somehow some of
the blocks arnt doing what they are supposed too so I'm trying to go through
and redo it. I know how to do the special paste to transfer the info over
but when I try to reset it, because the blocks are formated to be locked, it
will say something about debuging. How do I make it to where it will paste
the info and keep the blocked locked? It was done before with the old sheet
so I know it can be done, I just don't know how. Thank you for any help!


When the macro halts with the End..Debug message, and you select the
Debug option, what's the line of code that is highlighted?

Rgds

__
Richard Buttrey
Grappenhall, Cheshire, UK


Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=True, Transpose:=False

I copied that from the Visual Basic when it opened after I selected debug.
__________________________