Thread
:
Automatically bordering in 1500 sheets
View Single Post
#
13
Posted to microsoft.public.excel.programming
Don Guillett
external usenet poster
Posts: 10,124
Automatically bordering in 1500 sheets
Sub doborders1() 'assumes A is ALWAYS the longest column
For Each ws In ActiveWorkbook.Worksheets
ws.Cells.Borders.LineStyle = xlNone
lr = ws.Cells(Rows.Count, "a").End(xlUp).Row
With ws.Range("a1:m" & lr)
.Borders.LineStyle = xlContinuous
.BorderAround Weight:=xlThick 'Medium
End With
Next ws
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
that's basically the route i took in my code, but it wrapped and the op
couldn't figure out how to make i compile.
--
Gary
"Don Guillett" wrote in message
...
It could be even better and adaptable to a change to fewer rows IF we
knew which column is always the one with the last value. Then it could
delete too.
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"hardeep via OfficeKB.com" <u44683@uwe wrote in message
news:8717dc00083ee@uwe...
Greeeeeeeeeeeeeeeeeeeeeeeeeeeeet
Most Appriciate
Thank sir
Hardeep kanwar
Don Guillett wrote:
try this
Sub doborders()
For Each ws In ActiveWorkbook.Worksheets
lr = ws.Cells.SpecialCells(xlCellTypeLastCell).Row
With ws.Range("a1:m" & lr) 'Selection
.Borders.LineStyle = xlContinuous
.BorderAround Weight:=xlThick 'Medium
End With
Next ws
End Sub
Hi! Everybody
[quoted text clipped - 13 lines]
Hardeep kanwar
--
Message posted via
http://www.officekb.com
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett