Thread: Border help
View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
erikkeith via OfficeKB.com erikkeith via OfficeKB.com is offline
external usenet poster
 
Posts: 31
Default Border help

Thanks! That worked

Ron de Bruin wrote:
Sub test()
Dim rng As Range

Set rng = Cells.Find(What:="Totals", After:=ActiveCell, LookIn:=xlFormulas _
, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False)

If Not rng Is Nothing Then
With rng.Resize(1, 15)
.Borders(xlEdgeLeft).LineStyle = xlContinuous
.Borders(xlEdgeTop).LineStyle = xlContinuous
.Borders(xlEdgeBottom).LineStyle = xlContinuous
.Borders(xlEdgeRight).LineStyle = xlContinuous
End With
Else
MsgBox "Nothing found"
End If

End Sub

Yes, but how can I do it for just cells A through O? I find "Totals" on row
100 and then want cells adjust the borders for cells A:O for just that row. ?

[quoted text clipped - 16 lines]

I try to set up the borders for that entire row but it is not working. Help?


--
Message posted via http://www.officekb.com