ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   border non-contiguous rows (https://www.excelbanter.com/excel-programming/380472-border-non-contiguous-rows.html)

sugargenius

border non-contiguous rows
 
I'm building a report and certain sub-total rows need top/bottom
border. The actual rows to be "bordered" will vary. I can border the
subtotals as I create them, but i thought it would tidier if I kept
track of the rows to be bordered and did them all at once. Is this
possible:

<pseudocode
dim rowstoborder as string
rowstoborder = "5"
rowstoborder = rowstoborder & "," & "10"
rowstoborder = rowstoborder & "," & "20"

with rows( rowstoborder )
.Borders.LineStyle = xlNone
.Borders(xlEdgeTop).LineStyle = xlContinuous
.Borders(xlEdgeTop).Weight = xlThick
.Borders(xlEdgeBottom).LineStyle = xlContinuous
.Borders(xlEdgeBottom).Weight = xlThick
end with

</pseudocode


Don Guillett

border non-contiguous rows
 
Try this idea. Modify to suit

Sub bordernoncontiguous()
Range("a3,a7,a12").Borders.Weight = xlThick
End Sub
--

Don Guillett
SalesAid Software

"sugargenius" wrote in message
ups.com...
I'm building a report and certain sub-total rows need top/bottom
border. The actual rows to be "bordered" will vary. I can border the
subtotals as I create them, but i thought it would tidier if I kept
track of the rows to be bordered and did them all at once. Is this
possible:

<pseudocode
dim rowstoborder as string
rowstoborder = "5"
rowstoborder = rowstoborder & "," & "10"
rowstoborder = rowstoborder & "," & "20"

with rows( rowstoborder )
.Borders.LineStyle = xlNone
.Borders(xlEdgeTop).LineStyle = xlContinuous
.Borders(xlEdgeTop).Weight = xlThick
.Borders(xlEdgeBottom).LineStyle = xlContinuous
.Borders(xlEdgeBottom).Weight = xlThick
end with

</pseudocode




sugargenius

border non-contiguous rows
 

Don Guillett wrote:
Try this idea. Modify to suit

Sub bordernoncontiguous()
Range("a3,a7,a12").Borders.Weight = xlThick
End Sub
--

Don Guillett
SalesAid Software


Thanks Don, that worked perfectly


Don Guillett

border non-contiguous rows
 
Glad to help.

--
Don Guillett
SalesAid Software

"sugargenius" wrote in message
ps.com...

Don Guillett wrote:
Try this idea. Modify to suit

Sub bordernoncontiguous()
Range("a3,a7,a12").Borders.Weight = xlThick
End Sub
--

Don Guillett
SalesAid Software


Thanks Don, that worked perfectly





All times are GMT +1. The time now is 05:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com