Exit code

H

Heather

hi, I have a quick ? I'm guessing it's easy but I can't find the answer. I
have some code that ends up copying something and then pasting it into a tab
correctly but seems to hang up on it after it pastes with this below:
Select destination and Press Enter or Choose Paste
is there something I can add to it so that it'll get out of that mode?

here's my code
Worksheets(CStr(Trim(wsSource.Range("A12")) & " Platform")).Activate
Range("I7:N19").Select
Selection.Copy
ws.Activate
target.Offset(3, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues
Selection.PasteSpecial Paste:=xlPasteFormats

Thank you!!!!! :>
 
J

JLGWhiz

You probably want:

Application.CutCopyMode = False

at the end of the snippet. That kills the marching ants.
 
P

Patrick Molloy

Worksheets(CStr(Trim(wsSource.Range("A12")) & "
Platform")).Range("I7:N19").Copy
with target.Offset(3, 0)
.PasteSpecial xlPasteValues
..PasteSpecial xlPasteFormats
end with
application.CutCopyMode = False
 
H

Heather

thank you :) Works perfectly :)

Patrick Molloy said:
Worksheets(CStr(Trim(wsSource.Range("A12")) & "
Platform")).Range("I7:N19").Copy
with target.Offset(3, 0)
.PasteSpecial xlPasteValues
.PasteSpecial xlPasteFormats
end with
application.CutCopyMode = False
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top