How to insert a row into Excel Sheet?

  • Thread starter Thread starter Ivan Abramov
  • Start date Start date
I

Ivan Abramov

Hello.

I'm writing a code in VB6 that creates a reports in Excel by templates
(Excel files).
In one case I need to insert as many rows as there are records in db table
(as a rool a couple).
But the problem is there are static texts and other bookmarks below the place.
How can I insert a row(s) into the special place of Excel Sheet (where my
bookmark is) so that all the content below the place is going down?
(by object model of Microsoft Excel 12 Object Library).

Thanks in advance.
 
worksheets("Sheet1").rows("4:7").insert
assuming you know where you want to start the insert and you know how
many records you want to add.

Cheers,
Andrew
 
Back
Top