View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default I need a macro for inserting a border line every 20 rows


May want to change to
For i = 20 To 100 Step 20

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Don Guillett" wrote in message
...
Cleaned up from recorded macro below
Sub bottombordermod()
For i = 1 To 100 Step 20
Rows(i).Borders(xlEdgeBottom).LineStyle = xlContinuous
Next i
End Sub

Sub Macro10()
'
' Macro10 Macro
' Macro recorded 8/20/2008 by Donald B. Guillett
'

'
Rows("16:16").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
End Sub
Sub bottombordermod()
For i = 1 To 50 Step 10
Rows(i).Borders(xlEdgeBottom).LineStyle = xlContinuous
Next i
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Adamp" wrote in message
...
I need a macro for inserting a border line every 20 rows. i have tried to
record this, but I went wrong. Very wrong. It's a bottom border line.
(I
posted this before, but now I cannot find it). Thanks