insert rows in Multiple worksheet
thx for your response. Maybe I didn't make myself clear. My challengers a
1. add row(s) at the right place with the right amount. Row(s) are added
right beneath the active cell. The amount of row equals the round up value
(i.e. 2.1 becomes 3; 2.6 becomes 3) of the active cell.
2. both worksheet have row(s) added at same place with the same amount
"JaimeVasquez" wrote:
On May 26, 11:57 am, will wrote:
Im trying to figure out an easy way for user to do this, like push a
button, to insert the required amount of row(s) in both sheets at the right
place but still not sure if this is feasible. Hope someone here can offer
some comments, thanks!
HI, see if this helps:
Private Sub CommandButton1_Click()
Dim iRow1 As Integer, _
iRow2 As Integer, _
sRows As String
iRow1 = 14
iRow2 = 17
sRows = iRow1 & ":" & iRow2
Sheets(Array("Sheet2", "Sheet3")).Select
Sheets("Sheet3").Activate
Rows(sRows).Select
Selection.Insert Shift:=xlDown
Sheets("Sheet3").Select
Range(Cells(iRow1, 1), Cells(iRow1, 1)).Select
End Sub
Saludos
Jaime Vasquez
|