K
KiplingHfx22
I have a file that I'm trying to perform some calculations in (via a macro)
and then a macro file to simply store the macro. All I'm trying to do is to
copy a cell, then highlight a area and then paste. Instead of pasting in my
working file, it is pasting in my Macro file!
Any idea how I force it to paste in my working file? (i.e. the same place
from which it copies the value) Here's my code:
ActiveCell.Select
Selection.Copy
ActiveCell.Offset(0, -1).Range("A1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 1).Range("A1").Select
Range(Selection, Selection.End(xlUp)).Select
ActiveSheet.Paste
ActiveCell.Columns("A:A").EntireColumn.Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
ActiveCell.Offset(1, 0).Range("A1").Select
Application.CutCopyMode = False
Thanks.
and then a macro file to simply store the macro. All I'm trying to do is to
copy a cell, then highlight a area and then paste. Instead of pasting in my
working file, it is pasting in my Macro file!
Any idea how I force it to paste in my working file? (i.e. the same place
from which it copies the value) Here's my code:
ActiveCell.Select
Selection.Copy
ActiveCell.Offset(0, -1).Range("A1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 1).Range("A1").Select
Range(Selection, Selection.End(xlUp)).Select
ActiveSheet.Paste
ActiveCell.Columns("A:A").EntireColumn.Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
ActiveCell.Offset(1, 0).Range("A1").Select
Application.CutCopyMode = False
Thanks.