ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Border (https://www.excelbanter.com/excel-programming/389078-border.html)

Maximus[_3_]

Border
 
I am trying to create a border around a selection. I am currently
using

Range("C23:G27").Select
Selection.Borders.LineStyle = xlDouble

This results in borders throughtout every cell. How do I get a border
around the perimeter?

Thanks


Otto Moehrbach

Border
 
Range("C23 :G27").BorderAround LineStyle:=xlContinuous,
weight:=xlThick
HTH Otto

"Maximus" wrote in message
ups.com...
I am trying to create a border around a selection. I am currently
using

Range("C23:G27").Select
Selection.Borders.LineStyle = xlDouble

This results in borders throughtout every cell. How do I get a border
around the perimeter?

Thanks




Dave Peterson

Border
 
Range("C23:G27").BorderAround LineStyle:=xlDouble

There's more options for .borderaround that you may want to read about in VBA's
help.

Maximus wrote:

I am trying to create a border around a selection. I am currently
using

Range("C23:G27").Select
Selection.Borders.LineStyle = xlDouble

This results in borders throughtout every cell. How do I get a border
around the perimeter?

Thanks


--

Dave Peterson

Maximus[_3_]

Border
 
On May 9, 3:27 pm, "Otto Moehrbach" wrote:
Range("C23 :G27").BorderAround LineStyle:=xlContinuous,
weight:=xlThick
HTH Otto

"Maximus" wrote in message

ups.com...



I am trying to create a border around a selection. I am currently
using


Range("C23:G27").Select
Selection.Borders.LineStyle = xlDouble


This results in borders throughtout every cell. How do I get a border
around the perimeter?


Thanks- Hide quoted text -


- Show quoted text -


Outstanding Thanks!



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

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