View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
mark mark is offline
external usenet poster
 
Posts: 196
Default Inserting Blank Lines in Selection

A couple of problems...

you have it select A1, but then you try to access an
offset .offset(-1,0), so it's trying to check a row 0,
which there is none. I think you need to start it by
selecting cell A2.

if some records already have a blank row separating them,
will your selection.end(xldown) select them all? Won't it
stop at the blank row? You may need to use
activesheet.usedrange.rows.count to tell it how far to
select down.

try using c.entirerow.insert to do the insertion... when
I tried it, that worked fine, whereas the other way,
c.insert.row , got the object error.