Tuition on 'copyorigin'

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Please can someone tell me what this is used for with the Insert method. I
was hoping to be able to copy the contents of a row, and insert it below the
source row using this facility.
 
Jill,

CopyOrigin isn't the range that should be copied prior to insertion, if that is what you were
thinking.

CopyOrigin takes one of two named constants to determine what format the inserted cell should have:

xlFormatFromLeftOrAbove

or

xlFormatFromRightOrBelow

To do what you want, simply use

Rows(1).Copy
Rows(2).Insert

will copy row 1 and insert it above the existing row 2.

HTH,
Bernie
MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top