View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Dana DeLouis[_3_] Dana DeLouis[_3_] is offline
external usenet poster
 
Posts: 690
Default Insert range function and CopyOrigin -- addendum

I believe "CopyOrigin" makes multiple copies of the Origin to fill the
destination. Here is a small demo.

Sub Demo()
[D1] = "Hello"
[D2] = "There"

[D1:D2].Copy
[A1:A10].Insert Shift:=xlShiftDown, CopyOrigin:=True
Application.CutCopyMode = False
End Sub

HTH. :)
--
Dana DeLouis
Using Windows XP & Office XP
= = = = = = = = = = = = = = = = =


"Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message
...
You get rid of the "marching ants" by using:

Application.CutCopyMode = False

CopyOrigin seems to be a nonfunctional feature. I don't think there is a

way
of inserting a range without actually cutting or copying it ... unless you
just want to copy values, in which case you could use something like:

rngDestination.Value = rngSource.Value

But I don't think that's what you're looking for.

--

Vasant



"David Lewis" wrote in message
...
I meant without using select/copy. That's klunkier and
frequently leaves the shimmering-dotted box on the
worksheet. (by the way, hHow do I get rid of that).

Thanks. --David.

-----Original Message-----
How does the CopyOrigin argument to the Insert function as
applied to ranges work?

Actually, how does the whole Range.Insert function work?
The documentation in help isn't too helpful, nor is the
book I'm using (Walkenbach)

What I want to do is insert in one worksheet a copy of a
range of rows from another sheet.

Thanks. --David.
.