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
Range("N60").Select
Selection.Copy
Windows("Call Center Summary.xls").Activate
Range("B6").Select
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.

Sheets("Sheet1").Range("N60").Copy
Windows("Call Center Summary.xls").Activate
Sheets("Sheet2").Range("B6").PasteSpecial

Dave
OzGrid Business Applications