Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically add one row MSSailor Excel Discussion (Misc queries) 3 March 11th 09 03:36 AM
Automatically insert time in excel but not automatically updated NeueN Excel Worksheet Functions 4 December 25th 08 07:29 AM
alphabetize - automatically mandyjo830 Excel Worksheet Functions 2 November 14th 06 09:30 PM
St automatically changes to So lkaneft Excel Discussion (Misc queries) 2 June 30th 06 03:43 PM
Automatically add a new row yalex[_3_] Excel Programming 1 January 24th 04 12:25 AM


All times are GMT +1. The time now is 08:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"