Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 441
Default Shorter method to "box" some cells

I am using Office 2003 on Windows XP.

I simply want to draw a box around a single cluster of cells, but I find,
using the recorder that you have to use at least four lines of code to do
this:

Selection.Borders(xlEdgeLeft).Weight = xlThin
Selection.Borders(xlEdgeRight).Weight = xlThin
Selection.Borders(xlEdgeBottom).Weight = xlThin
Selection.Borders(xlEdgeTop).Weight = xlThin

Isn't there a one line method that is easier/faster (something like xlBox)?
Thanks in advance for your assistance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Shorter method to "box" some cells

Try this...

selection.borderaround xlthin
--
HTH...

Jim Thomlinson


"quartz" wrote:

I am using Office 2003 on Windows XP.

I simply want to draw a box around a single cluster of cells, but I find,
using the recorder that you have to use at least four lines of code to do
this:

Selection.Borders(xlEdgeLeft).Weight = xlThin
Selection.Borders(xlEdgeRight).Weight = xlThin
Selection.Borders(xlEdgeBottom).Weight = xlThin
Selection.Borders(xlEdgeTop).Weight = xlThin

Isn't there a one line method that is easier/faster (something like xlBox)?
Thanks in advance for your assistance.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Shorter method to "box" some cells

In my first post you probalby get the wrong kind of line. Weith is the second
argument so just add a comma

selection.borderaround , xlthin
--
HTH...

Jim Thomlinson


"quartz" wrote:

I am using Office 2003 on Windows XP.

I simply want to draw a box around a single cluster of cells, but I find,
using the recorder that you have to use at least four lines of code to do
this:

Selection.Borders(xlEdgeLeft).Weight = xlThin
Selection.Borders(xlEdgeRight).Weight = xlThin
Selection.Borders(xlEdgeBottom).Weight = xlThin
Selection.Borders(xlEdgeTop).Weight = xlThin

Isn't there a one line method that is easier/faster (something like xlBox)?
Thanks in advance for your assistance.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 441
Default Shorter method to "box" some cells

Exactly what I was looking for, thanks...

"Jim Thomlinson" wrote:

In my first post you probalby get the wrong kind of line. Weith is the second
argument so just add a comma

selection.borderaround , xlthin
--
HTH...

Jim Thomlinson


"quartz" wrote:

I am using Office 2003 on Windows XP.

I simply want to draw a box around a single cluster of cells, but I find,
using the recorder that you have to use at least four lines of code to do
this:

Selection.Borders(xlEdgeLeft).Weight = xlThin
Selection.Borders(xlEdgeRight).Weight = xlThin
Selection.Borders(xlEdgeBottom).Weight = xlThin
Selection.Borders(xlEdgeTop).Weight = xlThin

Isn't there a one line method that is easier/faster (something like xlBox)?
Thanks in advance for your assistance.

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
how can I disable "cutting cells" and "drag and drop "in excel ? mwoody Excel Worksheet Functions 4 August 25th 08 03:53 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Using "Cells" to write "Range("A:A,H:H").Select" Trip Ives[_2_] Excel Programming 3 June 5th 04 03:13 PM
Getting "compile error" "method or data member not found" on reinstall Bp Excel Programming 1 April 23rd 04 04:42 PM
What's the equivalent way of "Cells" method for the C++(ATL) David K. Kim Excel Programming 1 December 12th 03 12:16 AM


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