View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Duke Carey Duke Carey is offline
external usenet poster
 
Posts: 1,081
Default Selection.Copy issue

You can't copy that range in interactive Excel, nor in VBA.
Just copy each range individually, but you can do so without selecting them

Range("B2:B8").Copy

and if you know where it's going to go, a single command will do that, too

Range("B2:B8").Copy range("C9")

copies your first range to a range beginning with cell C9

"greyhound girl" wrote:

I am trying to copy a combination of a small contiguous range along with one
non-contiguous cell. The Selection.Copy command I am using is returning a
"That command cannot be used on multiple selections". I have not been able to
find the command that will do this. The related code I am using is below:

Sheets("sheet1").Activate
Set r1 = Range("B2:B8")
Set r2 = Range("E1:E1")
Set myMultiAreaRange = Union(r1, r2)
myMultiAreaRange.Select
MsgBox (myMultiAreaRange.Address)
Selection.Copy

Ideas??

Thanks!