Hi.
I have made a macro which adds new rows before the last row. It all
works fine but I know need the macro to add horizontal dotted lines
every third row.
this is the current code
Code:
--------------------
Sub insRows()
Dim ib As Integer
Dim x As Long, r As Range
ib = Application.InputBox("Enter number of rows to be added", "Add Lines", "5", , , "", , "1")
If ib < False Then
If ib < 1 Then Exit Sub
x = Range("A65536").End(xlUp).Row
Set r = Range("A" & x).Resize(ib)
r.EntireRow.Insert
r.Offset(ib).RowHeight = 12.75
Set r2 = Range(Cells(x, "P"), Cells(x + ib - 1, "P"))
myformula = "=SUM(E" & x & ":M" & x & ")"
r2.Formula = myformula
End If
End Sub
--------------------
I have tried many things but I cannot get just horizontal dotted lines
every third row.
Thank you in advance.
--
Corless
------------------------------------------------------------------------
Corless's Profile:
http://www.excelforum.com/member.php...o&userid=26711
View this thread:
http://www.excelforum.com/showthread...hreadid=399713