Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Applying Bottom and right border

Hi,
Please assist.
How do I put a bottom and right border on each cell in a range?
This is what I have for the bottom border.

Set rng = Range(Cells(Rows.Count, "A").End(xlUp), Range("l7"))

rng.Borders.LineStyle = xlNone
rng.Borders(xlInsideHorizontal).LineStyle = xlContinuous
rng.Borders(xlEdgeBottom).LineStyle = xlContinuous

rng.Borders.LineStyle = xlNone
rng.Borders(xlInsideHorizontal).LineStyle = xlContinuous
rng.Borders(xlEdgeLeft).LineStyle = xlContinuous

rng.Borders.LineStyle = xlNone
rng.Borders(xlInsideHorizontal).LineStyle = xlContinuous
rng.Borders(xlEdgeRight).LineStyle = xlContinuous


Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Applying Bottom and right border

Something like this...

Set rng = Range(Cells(Rows.Count, "A").End(xlUp), Range("l7"))

With rng
.Borders.LineStyle = xlNone
.Borders(xlInsideHorizontal).LineStyle = xlContinuous
.Borders(xlEdgeBottom).LineStyle = xlContinuous
.Borders(xlEdgeRight).LineStyle = xlContinuous
End With

--
HTH...

Jim Thomlinson


"Gwen" wrote:

Hi,
Please assist.
How do I put a bottom and right border on each cell in a range?
This is what I have for the bottom border.

Set rng = Range(Cells(Rows.Count, "A").End(xlUp), Range("l7"))

rng.Borders.LineStyle = xlNone
rng.Borders(xlInsideHorizontal).LineStyle = xlContinuous
rng.Borders(xlEdgeBottom).LineStyle = xlContinuous

rng.Borders.LineStyle = xlNone
rng.Borders(xlInsideHorizontal).LineStyle = xlContinuous
rng.Borders(xlEdgeLeft).LineStyle = xlContinuous

rng.Borders.LineStyle = xlNone
rng.Borders(xlInsideHorizontal).LineStyle = xlContinuous
rng.Borders(xlEdgeRight).LineStyle = xlContinuous


Thanks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Applying Bottom and right border

Thanks
Unfortunately, it only worked for the bottom border.

"Jim Thomlinson" wrote:

Something like this...

Set rng = Range(Cells(Rows.Count, "A").End(xlUp), Range("l7"))

With rng
.Borders.LineStyle = xlNone
.Borders(xlInsideHorizontal).LineStyle = xlContinuous
.Borders(xlEdgeBottom).LineStyle = xlContinuous
.Borders(xlEdgeRight).LineStyle = xlContinuous
End With

--
HTH...

Jim Thomlinson


"Gwen" wrote:

Hi,
Please assist.
How do I put a bottom and right border on each cell in a range?
This is what I have for the bottom border.

Set rng = Range(Cells(Rows.Count, "A").End(xlUp), Range("l7"))

rng.Borders.LineStyle = xlNone
rng.Borders(xlInsideHorizontal).LineStyle = xlContinuous
rng.Borders(xlEdgeBottom).LineStyle = xlContinuous

rng.Borders.LineStyle = xlNone
rng.Borders(xlInsideHorizontal).LineStyle = xlContinuous
rng.Borders(xlEdgeLeft).LineStyle = xlContinuous

rng.Borders.LineStyle = xlNone
rng.Borders(xlInsideHorizontal).LineStyle = xlContinuous
rng.Borders(xlEdgeRight).LineStyle = xlContinuous


Thanks


Reply
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
Applying a Border Around Sets of Data Orlanzo Excel Discussion (Misc queries) 2 November 13th 07 05:28 PM
Border at bottom of worksheet Terry Excel Discussion (Misc queries) 3 May 17th 07 08:51 PM
Apply bottom border only on filled cells, leaves blank cells without border? StargateFan[_3_] Excel Programming 4 April 8th 07 05:39 PM
Repeat bottom Border Scafidel Excel Discussion (Misc queries) 3 August 29th 06 05:37 AM
Setting Bottom Border On Each Page mcambrose Excel Programming 1 August 2nd 06 01:10 PM


All times are GMT +1. The time now is 04:25 PM.

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"