Best way of copy range of cells without select

I

Imbecill

Hi,
Why doesn't this work? "Method 'range' in object sheet failed" . I try to
get rid of the copy paste select activat - operations....

Blad105.Range("B6:B25,B29:B44,B52:B56") =
Blad104.Range("B6:B25,B29:B44,B52:B56")

/Thanks to any help
 
I

Imbecill

I answer myself:

Has to be a ".value" after the specified range - othervice it try to copy
the range, and it can't define the same worksheet name on two sheets...

/""



The value is needed baecause
 
J

JE McGimpsey

One way:

With Blad105.Range("B6:B25,B29:B44,B52:B56")
.Value = Blad104.Range(.Address).Value
End With
 
D

Dave Peterson

One way:

Option Explicit
Sub testme01()

Dim myAddresses As Variant
Dim iCtr As Long

myAddresses = Array("B6:B25", "B29:B44", "B52:B56")

For iCtr = LBound(myAddresses) To UBound(myAddresses)
blad105.Range(myAddresses(iCtr)).Value _
= blad104.Range(myAddresses(iCtr)).Value
Next iCtr

End Sub
 
D

Dave Peterson

That didn't work for me in xl2002.

IIRC, I think Tom Ogilvy gave warnings that it stopped working after xl97 in
wintel versions of excel.

(assigning values to multiple areas, that is)
 
Top