View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
isabelle isabelle is offline
external usenet poster
 
Posts: 587
Default Border formatting row of cells

hi Howard,

here is an example, hoping that this might help you

Sub test()
Dim lgn As Range
Dim i As Integer, y As Integer

Set lgn = Application.InputBox(Prompt:= _
"Please select a row with your Mouse to be bolded.", _
Title:="SPECIFY ROW", Type:=8)

For i = 3 To 22 ' column C to column V
For y = 1 To 4 ' xlEdge
With Cells(lgn.Row, i).Borders(y)
If i = 8 Then .LineStyle = xlContinuous Else .LineStyle = xlDot
If i 3 And i < 22 Then .ColorIndex = 5 Else .ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
Next
Next
End Sub

'1 = xlEdgeLeft
'2 = xlEdgeRight
'3 = xlEdgeTop
'4 = xlEdgeBottom
'5 = xlDiagonalDown
'6 = xlDiagonalUp

isabelle