LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
XP XP is offline
external usenet poster
 
Posts: 389
Default Border cells with less code?

I am using Office 2003 on Windows XP.

Drawing borders around cells seems so code intensive. Is there a shorter way
to accomplish the following (which simply boxes a range of cells)?

PLEASE NOTE: I tried "BorderAround," but this does not add the "inside
vertical" borders. This can be accomplished with one click of the toolbar
button, but in code...

With [A10:N10]
.Borders(xlEdgeTop).Weight = xlThin
.Borders(xlEdgeBottom).Weight = xlThin
.Borders(xlEdgeLeft).Weight = xlThin
.Borders(xlEdgeRight).Weight = xlThin
.Borders(xlInsideVertical).Weight = xlThin
.Borders(xlInsideHorizontal).Weight = xlThin
End With

Is there something like a "BoxAround" method? I tried BorderAround, but this
does not add the "inside vertical" borders.

Thanks much in advance for your input.
 
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 Cells Steved Excel Worksheet Functions 4 July 29th 09 08:14 PM
I want to select only cells with a border dadouza Excel Discussion (Misc queries) 1 June 29th 08 11:33 PM
code to fill in missing border lines Jack Sons Excel Discussion (Misc queries) 3 November 3rd 05 10:06 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
cells not printing within border Pookie Excel Worksheet Functions 0 March 7th 05 06:37 PM


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