View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Radoslav Radev Radoslav Radev is offline
external usenet poster
 
Posts: 2
Default SIMULTANEOUSLY adding rows in two sheets

Dear KL,

Many thanks for your assistance. Unfortunately the code you have sent me is
not exactly what I was looking for.

Its what you have sent me.

Sub InsertRows()
Dim myWS As Variant
Application.ScreenUpdating = False
myWS = Array("Sheet1", "Sheet2", "Sheet3")
Sheets(myWS).Select
Rows(5).Insert Shift:=xlDown
Sheets("Sheet1").Select
Application.ScreenUpdating = True
End Sub

Most probably I wasnt clear in my problem explanation. Let me try again.

Imagine we are working in sheet1 and you insert two rows somewhere into the
sheet just using the tool bar €“ Insert/rows. I need automatically the same
number of rows with the same address to be inserted into sheet2.

Radoslav


"KL" wrote:

Radoslaw,

try this:

Sub InsertRows()
Dim myWS As Variant
Application.ScreenUpdating = False
myWS = Array("Sheet1", "Sheet2", "Sheet3")
Sheets(myWS).Select
Rows(5).Insert Shift:=xlDown
Sheets("Sheet1").Select
Application.ScreenUpdating = True
End Sub

Regards,
KL

"Radoslav Radev" wrote in message
...
I use Excel 2003. I want adding rows in one sheet the some number of rows
to
be added in other sheet but automatically. I mean, if I add two rows
between
33 and 34 row in sheet 1 the some number of rows to be add in sheet 2
between
33 and 34 row.

Thank you in advance for your help.

Radoslav