
Copy and paste special values without switching sheets
Hi, I have a very simple program that copies some data
from one column to another and pastes the values only
(paste special). When the macro is run i dont want it to
go from one sheet to another sheet.(eg sheets
("positions").select). I want it to run in the background
if I am in another sheet and not switch sheets. I have
pasted it below. The third line doesnt work? Any
suggestions. Thanks.
Public Sub Copy2()
Sheets("Positions").Range("I8:I200").Copy
Sheets("Positions").Range("al8").Select
Selection.PasteSpecial Paste:=xlValues,
Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
End Sub