View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Hardeep_kanwar[_2_] Hardeep_kanwar[_2_] is offline
external usenet poster
 
Posts: 103
Default Automatically bordering in 1500 sheets

Thanks Sir

It works Fine But not Completely. As I mentioned that First apply the ALL
BORDERS and then THICK BOX BORDERS

Your Code apply only THICK BOX BORDERS for outer edge ,But not apply ALL
BORDERS. Which is apply on inner data.


Thanks For your Quick Reply

Regards

Hardeep kanwar

"Ranjit kurian" wrote:

Hi Hardeep

Try the below code,

Sub Boarding()
Dim sh
For sh = 1 To Sheets.Count
Sheets(sh).Select
Range("A1").Select
Range("A65536").End(xlUp).Select
Range(Selection, Selection.End(xlUp)).Select
Range(Selection, Selection.End(xlToRight)).Select

'board
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Range("A1").Select
Next sh
End Sub

"hardeep via OfficeKB.com" wrote:

Hi! Everybody

I have a workbook with 1500 sheets with same Columns i.e A to M .But the row
range is Different some sheets has Range A1 to M2, Some has A1 to M50 and
Some has A1 to M20 and so on.

Now i want to Bordering the all sheets. Firstly apply the ALL BORDER and then
THICK BOX BORDER in all sheets. Is it possible? Because i dont want to do
manually one by one.


Any Solution will Be most Appriciate

Thanks In Advance

Hardeep kanwar

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200807/1