Excel rows.insert question

  • Thread starter Cooper, Scott A.
  • Start date
C

Cooper, Scott A.

Excel programing help shows CopyOrigin as a parameter for insert method but I
can't find out what it is or how it works. What I'd like to do is copy a
range of cells and insert them in places but I also need to insert a blank
row before the copied range so 'copy/paste' approach is out. If this
parameter does it, then how does it work else, how else can I do this?

For i = 3 To iRowCnt
Select Case oWrkSheet.Cells(i, 3).Value
Case "J"
oWrkSheet.Rows(i).Insert shift:=xlShiftDown
oWrkSheet.Rows(i).Insert shift:=xlShiftDown
CopyOrigin:=oWrkSheet.Rows(2)
oWrkSheet.Cells(i, 1).Value = "Software"
oWrkSheet.Cells(i, 1).Font.Bold = True

Case "S"
oWrkSheet.Rows(i).Insert shift:=xlShiftDown
oWrkSheet.Cells(i, 1).Value = "Service & Support"
oHeadRow.Insert shift:=xlShiftDown

Case "P"
oWrkSheet.Rows(i).Insert shift:=xlShiftDown
oWrkSheet.Cells(i, 1).Value = "Training"
oHeadRow.Insert shift:=xlShiftDown
End Select
Next
 
C

Cindy M.

Hi =?Utf-8?B?Q29vcGVyLCBTY290dCBBLg==?=,
Excel programing help shows CopyOrigin as a parameter for insert method but I
can't find out what it is or how it works.
Try asking the specialists in the excel.programming newsgroup. Very few of them
venture into the "Office.developer" groups...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

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

Similar Threads


Top