View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Alex J Alex J is offline
external usenet poster
 
Posts: 85
Default deselecting a highlighted range after a VBA copy procedure

Paul,
If you are transferring values, I think this will work without selecting
the range:

Worksheet2.Range2.Value = Worksheet1.Range1.Value

I also know that:
Worksheet1.Range1.Copy Worksheet2.Range2

will work, but this is not PasteSpecial, of course.

Alex J

"Paul James" wrote in message
...
I've noticed that when I run a copy and paste operation in VBA using
statements of the form

Worksheet1.Range1.Copy
Worksheet2.Range2.pastespecial

that target range, Range2, remains selected unless I perform some other
operation on a range in Worksheet2.

I would like to unselect that range after the paste method is executed,

but
I'd rather not use a Select method at that point in my code, because I

don't
want to make Worksheet2 the active sheet. Is there a way to deselect that
highlighted range without using a Select statement?

Thanks in advance.

Paul