Thread: Border Problem
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Gizmo Gizmo is offline
external usenet poster
 
Posts: 47
Default Border Problem

Thanks Jim

"Jim Cone" wrote:


Sheets("Debrief Report").Activate
LwriteRow = Cells(Rows.Count, 2).End(xlUp).Row
LborderRow = LwriteRow + 2

With Range("A1", "F" & LborderRow)
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
.Borders(xlEdgeLeft).LineStyle = xlNone
.Borders(xlEdgeTop).LineStyle = xlNone
With .Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
.Borders(xlEdgeRight).LineStyle = xlNone
.Borders(xlInsideVertical).LineStyle = xlNone
End With
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




"Gizmo"
wrote in message
Excel2003
How can I find the last used row, then select cells "A:F" & Lastrow +2 and
apply bottom border.
I tried this code but no go.

Sheets("Debrief Report").Activate
LWriteRow = Cells(65536, 2).End(xlUp).Row
LBorderRow = LWriteRow + 2

Range("A:F" & LBorderRow).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