N
nejlangton
On my worksheet I have a button that inserts a copied row from anothe
sheet when pressed. The code is as follows:
Sub NEWRMO()
'
' NEWRMO Macro
' Macro recorded 02/09/2004 by charles
'
'
Sheets("Template").Select
Rows("11:11").EntireRow.Copy
Sheets("Risk Register").Select
ActiveCell.Offset(0, 0).Rows("1:1").EntireRow.Select
Selection.Insert Shift:=xlDown
End Sub
At present the row is pasted wherever the active cell is, however
would like the macro to insert the row on the same line as the butto
was when pressed.
Presumably I need to get the macro to select the row relative to th
button that operates it?
Any ideas?
One other issue might be that the button is itself copied several time
and so exists several times on the same sheet. Perhaps a bette
explanation is to explain what the sheet does. It is a Risk register t
record project risks. There exists a macro to add a new risk (which i
two rows of data, the second being a row with a mitigation option), a
well as the two rows of data it also copies the button as describe
above. This button activates the macro printed above and insert
another mitigation option. Dont know if this paragraph helps if no
please disregard
sheet when pressed. The code is as follows:
Sub NEWRMO()
'
' NEWRMO Macro
' Macro recorded 02/09/2004 by charles
'
'
Sheets("Template").Select
Rows("11:11").EntireRow.Copy
Sheets("Risk Register").Select
ActiveCell.Offset(0, 0).Rows("1:1").EntireRow.Select
Selection.Insert Shift:=xlDown
End Sub
At present the row is pasted wherever the active cell is, however
would like the macro to insert the row on the same line as the butto
was when pressed.
Presumably I need to get the macro to select the row relative to th
button that operates it?
Any ideas?
One other issue might be that the button is itself copied several time
and so exists several times on the same sheet. Perhaps a bette
explanation is to explain what the sheet does. It is a Risk register t
record project risks. There exists a macro to add a new risk (which i
two rows of data, the second being a row with a mitigation option), a
well as the two rows of data it also copies the button as describe
above. This button activates the macro printed above and insert
another mitigation option. Dont know if this paragraph helps if no
please disregard