Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
try something like this
Dim iBorder As XlBordersIndex For iBorder = xlEdgeLeft To xlEdgeRight With [A10:N10] .Borders(iBorder).Weight = xlThin End With Next HTH Philip "XP" wrote: 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. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Range("A10", "N10").Borders.Weight = xlThin
-- HTH... Jim Thomlinson "XP" wrote: 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. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It was so simple, I couldn't figure it out... ;-)
Thanks Jim! "Jim Thomlinson" wrote: Range("A10", "N10").Borders.Weight = xlThin -- HTH... Jim Thomlinson "XP" wrote: 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. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks!
"Philip" wrote: try something like this Dim iBorder As XlBordersIndex For iBorder = xlEdgeLeft To xlEdgeRight With [A10:N10] .Borders(iBorder).Weight = xlThin End With Next HTH Philip "XP" wrote: 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Border Cells | Excel Worksheet Functions | |||
I want to select only cells with a border | Excel Discussion (Misc queries) | |||
code to fill in missing border lines | Excel Discussion (Misc queries) | |||
Changing the border of one cell s/n change the border of adjacent | Excel Discussion (Misc queries) | |||
cells not printing within border | Excel Worksheet Functions |