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: 9
Default Add Border to the right side (xlEdgeRight) of a large number of co

So I have a very large report with a ton columns that I would to add a border
on the right edge. Do I need to repeat this code for each column (see
below), because the columns go way out to DE and that would see quite
cumbersome.
-------
Range("A9").Select
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With

Range("B9").Select
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
-----

Finally I tried this:
Range("A9:D9").Borders(xlEdgeRight).Weight = xlThin

....but that only put the border on D9 and that doesn't work.

Thanks!

 
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
Easy Reading - large number minus small number MUTTMIND New Users to Excel 5 February 5th 09 10:08 AM
Insert or add one number at right side to ISBN rodrigovim Excel Programming 3 January 24th 07 04:04 PM
different colour each side of diagonal border frisby Excel Discussion (Misc queries) 2 June 19th 06 03:55 PM
How do I show a surplus number in an entry (on the plus side) SUSIEQ450 Excel Worksheet Functions 1 January 28th 06 03:17 PM
Getting rid of one side a border? Shaun Allan Excel Programming 2 July 24th 04 03:57 PM


All times are GMT +1. The time now is 02:35 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"