ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Bug applying Borders to Range (https://www.excelbanter.com/excel-programming/403640-bug-applying-borders-range.html)

Bart[_6_]

Bug applying Borders to Range
 
Who can explain me the following problem with applying borders to
cells?
The Border property window for cells looks incomplete to me or at
least is very inconvenient.
Borders 'belong' to cells. You can experiment with this by moving
cells around bordering cells with Borders.

The best way to show this problem is by example:
Cell A1 has a Bottom Border. The range A2:A3 is selected.
Now, the Border Property window is showing a Top Border for this
range. I think that's incorrect. It should be, I think, at least a
GRAY Top Border, meaning that there is a Border, but not 'belonging'
to the selected range.
It even becomes more bizarre when at this point a Bottom Border, for
example, is added. By applying this, the Bottom Border of A1 becomes
also a 'belonging' of cell A2 as a Top Border.

I'm using Excel 2003 SP2. Has this Border property window been
replaced in the 2007 version?

Regards and good luck,

Bart

Peter T

Bug applying Borders to Range
 
It's all there, ie if there is a border and if it belongs to the cell. Look
at border items 1 to 4 or (strangely) with the other xl side constants, eg

Sub test3()
Dim cel As Range

For Each cel In Selection
With cel.Borders
Debug.Print .Item(xlEdgeLeft).LineStyle, .Item(xlLeft).LineStyle
Debug.Print .Item(xlEdgeTop).LineStyle, .Item(xlTop).LineStyle
Debug.Print .Item(xlEdgeBottom).LineStyle, .Item(xlBottom).LineStyle
Debug.Print .Item(xlEdgeRight).LineStyle, .Item(xlRight).LineStyle
End With
Debug.Print
Next
End Sub

Irritatingly there is no constant number difference between pairs, for
convenience border items -

7, 8 , 9 , 10
1, 3, 4, 2

As for the dialog, I agree it could and possibly should be possible to
convey to user which cell a border belongs to, OTH it would probably
unnecessarily confuse for most purposes. It's not particularly the fact that
yopu applied some other border in the dialog that went on to assign the
'neighbour's border to self, but the fact some change was made in the dialog
and then pressed OK.

Regards,
Peter T



"Bart" wrote in message
...
Who can explain me the following problem with applying borders to
cells?
The Border property window for cells looks incomplete to me or at
least is very inconvenient.
Borders 'belong' to cells. You can experiment with this by moving
cells around bordering cells with Borders.

The best way to show this problem is by example:
Cell A1 has a Bottom Border. The range A2:A3 is selected.
Now, the Border Property window is showing a Top Border for this
range. I think that's incorrect. It should be, I think, at least a
GRAY Top Border, meaning that there is a Border, but not 'belonging'
to the selected range.
It even becomes more bizarre when at this point a Bottom Border, for
example, is added. By applying this, the Bottom Border of A1 becomes
also a 'belonging' of cell A2 as a Top Border.

I'm using Excel 2003 SP2. Has this Border property window been
replaced in the 2007 version?

Regards and good luck,

Bart





All times are GMT +1. The time now is 12:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com