View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
greyhound girl greyhound girl is offline
external usenet poster
 
Posts: 11
Default Selection.Copy issue

*sigh* ... guess I'll have to do it with individual copy and paste. Thanks
though!

"Jim Cone" wrote:


If the ranges are the same size then the selection will copy...
Set r1 = Range("B2:B8")
Set r2 = Range("E2:E8")
Otherwise, I believe you are stuck with copying and pasting the
individual areas.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"greyhound girl"

wrote in message
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!