De selecting a range after a copy and paste is performed

M

ML0940

Hi
In the below code, I am copying a range from Sheet 1 and with the
PasteValues method, I am pasting that range to a cell on Sheet 2.
The problem I am having is that I can not "de select" the selected (copied)
range on Sheet 1. I have tried doing an ESC using SendKeys but that doesn't
seem to want to work.

Any ideas?
Is there a select = False or some code that I am missing?

Thanks!
ML


'Copy Bills
Sheets(1).Activate
Sh1bw.Offset(0, 2).Copy 'Copy Column C bills

Sheets(2).Activate
Sh2bw.Offset(0, 1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone 'Paste bills
one column over from Sh2bw
 
F

FSt1

hi
not sure exactly what you mean by "de select". do you mean remove from the
clipboard?
CutCopyMode = False

repost to clairfy.
Regards
FSt1
 
M

ML0940

Yes, that is exactly what I was looking for
I did not know that this method existed.
Now that I looked it up in The help Screen
This is precisely what I needed
Application.CutCopyMode = True

It removed the rectangular selection box around the copied (source) range

Thank you very much!
ML
 
M

ML0940

FS
The interesting thing is that both True or False acheive the same result
Therefore, it does make more sense to say False
And this did precisely what I needed it to

Thank you again
ML
 

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

Top