Hi

I have the following problem

We are building a shift transfersheet. This sheet is to keep track of changes during the building of our module. In a row are several formulas, several cells are merged.

Underneath the row that need to be inserted is a table.

So we want a button that automatically insert a row with the info of the row above, also we don't know how many lines we need to add. But it always need to be added from line 45. This is in the template that we build allready.

The code I have sofar is:
Sub Add_row()
'
' Add_row Macro
'

'
Rows("46:46").Select
Selection.Insert Shift:=xlDown
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlMedium
End With
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlMedium
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("C45").Select
Selection.AutoFill Destination:=Range("C45:C46"), Type:=xlFillDefault
Range("C45:C46").Select
Range("D45").Select
Selection.AutoFill Destination:=Range("D45:D46"), Type:=xlFillDefault
Range("D45:D46").Select
Range("G46:K46").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = True
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.Merge
With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlBottom
.WrapText = True
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
Rows("47:47").Select
End Sub

From line 47 it inserts the line at row 47 and stays at 47.
I hope this is enough info, and that somebody can help me out. This is build with recording the macro

Gr DupkeVFR