MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Copy/Past Question

Posted by Jonathan on February 15, 2001 3:49 PM

Why is it, when I manually copy a cell from one report and paste it into another, it works, but when I write a code to do it, it tells me the copy and paste areas aren't the same? The code I am using is below.
ActiveWindow.SmallScroll Down:=30
Windows("Call Center Summary.xls").Activate
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

Posted by Dave Hawley on February 15, 2001 4:29 PM

Hi Jonathan

I'm guessing that when you run the macro the activesheet in one or both Workbooks are not the same as when you do it manually. Change your code to this and change the sheet names to suit. Make sure neither cell is a merged one also.

Windows("Call Center Summary.xls").Activate

OzGrid Business Applications