Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automatically add new row
Hi Bob,
Thank you for your reply. It's too bad that it can't be done. Still it may be interesting wit the button. Can you give me more details on that? It has to insert row relative to the rows added in the main sheet. The other sheets are linked to the main sheet. When the row is adde can one do it in such a way that the links are also in there? /Jom Bob Phillips wrote: *Inserting a row is not a trappable event, so you cannot do i automatically. You could have a button that you click that runs a macro to insert row on all sheets. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "vwhungsuriya " wrot in message ... Hi All, I am working with a couple of sheets in a workbook. In the mai sheet I add information and often I add new rows. The other sheets ar linked to this main sheet. I know there must be a way such that a new ro is added in the other sheets when I add a row in the main sheet. Even better if it would be possible to have formulas and link automatically copied in as well. I am sort of a beginner and I am wondering if you might have any suggestions. Thanks! --- Message posted from http://www.ExcelForum.com/ -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automatically add new row
Hi Jom,
here is an example macro Sub AddRows() Dim numRows Dim nRow As Long Dim sh As Worksheet nRow = ActiveCell.Row numRows = InputBox("How many rows to add?") If numRows < "" Then For Each sh In Worksheets(Array("Sheet1", "Sheet2", "Sheet3")) sh.Cells(nRow, "A").Resize(numRows, 1).EntireRow.Insert Next sh End If End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "vwhungsuriya " wrote in message ... Hi Bob, Thank you for your reply. It's too bad that it can't be done. Still it may be interesting with the button. Can you give me more details on that? It has to insert rows relative to the rows added in the main sheet. The other sheets are linked to the main sheet. When the row is added can one do it in such a way that the links are also in there? /Jom Bob Phillips wrote: *Inserting a row is not a trappable event, so you cannot do it automatically. You could have a button that you click that runs a macro to insert a row on all sheets. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "vwhungsuriya " wrote in message ... Hi All, I am working with a couple of sheets in a workbook. In the main sheet I add information and often I add new rows. The other sheets are linked to this main sheet. I know there must be a way such that a new row is added in the other sheets when I add a row in the main sheet. Even better if it would be possible to have formulas and links automatically copied in as well. I am sort of a beginner and I am wondering if you might have any suggestions. Thanks! --- Message posted from http://www.ExcelForum.com/ * --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Automatically add one row | Excel Discussion (Misc queries) | |||
Automatically insert time in excel but not automatically updated | Excel Worksheet Functions | |||
alphabetize - automatically | Excel Worksheet Functions | |||
St automatically changes to So | Excel Discussion (Misc queries) | |||
Automatically add a new row | Excel Programming |