Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Insert range function and CopyOrigin

11 views
Skip to first unread message

anon...@discussions.microsoft.com

unread,
Dec 15, 2003, 9:05:21 AM12/15/03
to
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.

David Lewis

unread,
Dec 15, 2003, 10:32:00 AM12/15/03
to
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.

>.
>

Vasant Nanavati

unread,
Dec 15, 2003, 10:50:07 AM12/15/03
to
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" <anon...@discussions.microsoft.com> wrote in message
news:009801c3c320$95539b00$a101...@phx.gbl...

Tom Ogilvy

unread,
Dec 15, 2003, 10:51:26 AM12/15/03
to
Sub Tester3()
With Worksheets("Sheet1")
.Range("A10:F15").Copy
End With
With Worksheets("Sheet3")
.Range("F6").Insert xlShiftDown
End With
Application.CutCopyMode = False
End Sub

Not sure what copyorigin refers to.

--
Regards,
Tom Ogilvy

"David Lewis" <anon...@discussions.microsoft.com> wrote in message
news:009801c3c320$95539b00$a101...@phx.gbl...

David Lewis

unread,
Dec 15, 2003, 4:17:49 PM12/15/03
to

>-----Original Message-----
>You get rid of the "marching ants" by using:
>
>Application.CutCopyMode = False

Ah, thanks! That makes cutting and copying quite a bit
more attractive.

>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

Yep, was about to draw the same conclusion myself. Seems
like an odd omission.

--David.


BrianB

unread,
Dec 16, 2003, 7:16:50 AM12/16/03
to
Why not just use Copy & Paste ? You can record a macro of your actions
and come back with a new message if you have problems.


---
Message posted from http://www.ExcelForum.com/

Dana DeLouis

unread,
Dec 16, 2003, 7:51:24 AM12/16/03
to
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
news:%23pFceMy...@TK2MSFTNGP09.phx.gbl...

Dana DeLouis

unread,
Dec 16, 2003, 8:01:19 AM12/16/03
to
Ahh! Please disregard that. That is not correct.

--
Dana DeLouis


= = = = = = = = = = = = = = = = =

<snip>


djh63

unread,
Jan 1, 2004, 9:33:05 PM1/1/04
to
There is one use for CopyOrigin ... telling the insert whether to use
the formatting above/below/left/right of the inserted text. The only
value I've seen is xlFormatFromRightOrBelow ... Left/Above is the
default. In fact, that's how I found this thread is searching for a
list of possible values ... not many mentions of this ... had to resort
to recording a macro to figure out the right value for copying from
below ... ;)
0 new messages