Hi
I hope someone can help me with improving the following code:
Explaination would be most helpful.
Rgds
Kieranz
Sub InsertRow()
Dim sClrC As String, iActvC As Integer
sClrC = "D1:J1,L1,N1:O1,U1"
iActvC = Range("lrnInsertCurr").Column
Range("InsertRow").Select
ActiveCell.Offset(-1, 0).EntireRow.Select
Selection.Copy
Selection.insert shift:=xlDown
Range("InsertRow").Offset(-1, 1).Select
Application.CutCopyMode = False
ActiveCell.Offset(0, -iActvC).Range(sClrC).ClearContents
Range("InsertRow").Offset(-1, 1).Select
End Sub
I hope someone can help me with improving the following code:
Explaination would be most helpful.
Rgds
Kieranz
Sub InsertRow()
Dim sClrC As String, iActvC As Integer
sClrC = "D1:J1,L1,N1:O1,U1"
iActvC = Range("lrnInsertCurr").Column
Range("InsertRow").Select
ActiveCell.Offset(-1, 0).EntireRow.Select
Selection.Copy
Selection.insert shift:=xlDown
Range("InsertRow").Offset(-1, 1).Select
Application.CutCopyMode = False
ActiveCell.Offset(0, -iActvC).Range(sClrC).ClearContents
Range("InsertRow").Offset(-1, 1).Select
End Sub