Problem setting BorderArround LineStyle:=xlLineStyleNone

J

jc

When running the following code:
Selection.BorderAround LineStyle:=xlDouble
Selection.BorderAround LineStyle:=xlLineStyleNone
the first line sets the border around the selection to xlDouble
the second line does nothing
VB help says:

"To clear the border, you must set the LineStyle property to xlLineStyleNone
for all the cells in the range."

Am I doing something wrong or is there a problem with EXCEL 2003.

I know that I can set the individual borders (left, right, top, bottom) the
problem that this causes for me is that when you do this it overrides the
border on the neighboring cell: ie setting the right border overrides the
left border on the cell to the right.
JC
 
J

JLGWhiz

Don't ask me why because I have no idea, but this syntax works for deleting
the borders.

Selection.Borders.LineStyle = xlLineStyleNone
 
J

JLGWhiz

Apparently the Design Engineers had problems separating the borders of
individual cells, because the left wall of one is the right wall of another
and the bottom of one is the top of another. The borders are just line
segments along those invisible walls and the walls a just long lines of
pixels that turn dark or different colors at points specified when the user
desinates a cell parameter. Easy enough to control if working with pieces
inside the range but difficult when trying to isolate the enclosure of the
range as an entity. By now you have guessed that I have not a clue what I
am talking about.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top