Range.Copy only works with a named destination parameter?
(target)
dereferences target and returns the value of target. Remove the parentheses
in accordance with VBA syntax. When calling and referencing, use parentheses
only when dictated by the syntax.
--
Regards,
Tom Ogilvy
"colin_e" wrote:
Having an odd problem with the Range.Copy method.
This code:
Set source= Range("VL_Source")
Set target = VL.Offset(1).Resize(1, 1)
source.Copy Destination:=target
works fine. However the same thing with positional parameter:
Set source= Range("VL_Source")
Set target = VL.Offset(1).Resize(1, 1)
source.Copy (target)
fails with the error-
Run-time error '1004':
Copy methid of Raneg class failed
As far as I can see they mean exactly the same thing (source and target are
both declared as type Range). Any idea why this happens?
Regards; Colin
|