LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Help required putting borders around cells.

Can anyone help ?

I need to put border on a number of cells
of which number of rows is unknown.

The first routine below was originally used to find
the number of rows and then fill down the columns.

The 2nd part is a recording of keypresses to ut the
border on the cells.

HOW do I marry the two parts together in order to
put borders inside and around Range ("A3:F" & LastRows)



Dim LastRow As Long
With Worksheets("Sheet1")
LastRow = .Cells(Rows.Count, "A").End(xlUp).Row
.Range("B3").AutoFill Destination:=.Range("B3:B" & LastRow) _
, Type:=xlFillDefault

----------------------------------------------------------------


Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With



Regards
Centurian.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
taking numbers in vertical cells putting them in horizontal cells jhawk22 Excel Worksheet Functions 4 April 28th 10 08:37 PM
Getting a filename into VBA and putting it into cells Babymech Excel Discussion (Misc queries) 2 February 27th 10 01:48 PM
Putting Multiple Cells into 1 FormulaQuestioner Excel Discussion (Misc queries) 10 October 1st 08 06:25 AM
Putting row numbers in cells [email protected] Excel Discussion (Misc queries) 3 November 5th 06 12:53 AM
how can I do this without actually putting into cells Papa Jonah Excel Programming 3 November 30th 04 02:34 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"