#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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!

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
border on last cell of page effects border on beginning cell of ne GaryE Excel Discussion (Misc queries) 0 March 23rd 09 05:47 AM
Apply bottom border only on filled cells, leaves blank cells without border? StargateFan[_3_] Excel Programming 4 April 8th 07 05:39 PM
Border help erikkeith via OfficeKB.com Excel Programming 8 May 7th 06 01:22 PM
Changing the border of one cell s/n change the border of adjacent gjanssenmn Excel Discussion (Misc queries) 2 October 5th 05 08:35 PM
Border Derrick Robinson Excel Worksheet Functions 2 May 9th 05 03:00 AM


All times are GMT +1. The time now is 06:51 PM.

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

About Us

"It's about Microsoft Excel"