Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Insert range function and CopyOrigin

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Insert range function and CopyOrigin -- addendum

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.
.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Insert range function and CopyOrigin -- addendum

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" 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.
.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Insert range function and CopyOrigin -- addendum


-----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.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Insert range function and CopyOrigin

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/



  #6   Report Post  
Posted to microsoft.public.excel.programming
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.
.





  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 690
Default Insert range function and CopyOrigin -- addendum

Ahh! Please disregard that. That is not correct.

--
Dana DeLouis
= = = = = = = = = = = = = = = = =

<snip


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Insert range function and CopyOrigin -- addendum

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 ... ;)


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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW DO i INSERT A RANGE OF SERIAL DATES IN THE WORKDAY FUNCTION rosemontbill Excel Worksheet Functions 1 October 15th 09 05:47 PM
Insert range of cells with a function firsttimer Excel Worksheet Functions 2 May 29th 07 09:43 AM
How do I insert a calculated cell range into an excel function Gary Wallis Excel Worksheet Functions 2 April 26th 07 03:28 PM
Insert SUM function for range Denis Petrov Excel Programming 3 October 21st 03 06:44 PM
expression.Insert(Shift, CopyOrigin) ? Alex T Excel Programming 1 September 23rd 03 04:00 AM


All times are GMT +1. The time now is 03:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"