![]() |
How to insert a row into Excel Sheet?
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. |
How to insert a row into Excel Sheet?
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 On 10 Sep, 14:53, Ivan Abramov wrote: 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. |
All times are GMT +1. The time now is 12:32 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com