this is code to copy a row, insert the copied row, highlight it and then find cells in the active row and delete the data.
how do I write the code so that Range("K5:Q5") & Range("S5") just goes to the corresponding cells in those columns for the active row?
how do I write the code so that Range("K5:Q5") & Range("S5") just goes to the corresponding cells in those columns for the active row?
Code:
Private Sub insertcopiedrow_Click()
ActiveCell.EntireRow.Select
Selection.Copy
Selection.Insert Shift:=xlDown
With Selection.Interior
.PatternColorIndex = xlAutomatic
.Color = 16737996
.TintAndShade = 0
.PatternTintAndShade = 0
End With
[COLOR=#FF0000]Range("K5:Q5").[/COLOR]Select
Selection.ClearContents
[COLOR=#FF0000]Range("S5").[/COLOR]Select
Selection.ClearContents
End Sub
[code/]