View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Richard Choate Richard Choate is offline
external usenet poster
 
Posts: 42
Default Range.BorderAround(xlLineStyleNone)

My interpretation of his post was that he was going through a range clearing
the borders from cells. My solution, without giving the specific code just
yet, was to just do it all at once without looping at all. I don't see why
that is so useless without knowing more, but the OP seemed offended that I
had wasted his time with such a suggestion and proceeded to give me a
lesson. I'm trying to help and I don't need a sanctimonious OP implying that
my help was stupid. I've been coding for a few years now and feel that I
have some idea of what I'm doing, otherwise I would not have responded,
potentially setting an OP in the wrong direction. Thank you, Myrna, for your
polite support of my attempt to help.
Richard Choate

"Myrna Larson" wrote in message
...
Your statements re With/End With being useless may be true for this
particular code, but in
general this syntax can improve the execution speed. MS has published data
describing how much
improvement you get for each "dot" that you remove.

On Sat, 26 Jul 2003 17:52:22 -0700, "John A Grandy"
wrote:

Huh? What does that have to do with anything?

The "With" statement has absolutely no affect on the functionality of the
methods invoked on its operand (or sub-classes of its operand) ...

... it's just a presentational shorthand which can be used for those a
stylistic prefererence for coding in that manner ....

in fact in this particular case, using a "With" has no value whatsoever
because only one method is invoked for each iteration of the "For Each"

loop


"Richard Choate" wrote in message
...
Wat is the Call statement for? Why don't you use a With statement for a
defined range?
Richard Choate

"John A Grandy" wrote in message
...
for me, the following code does not remove any borders for any cells in

the
range .....

For Each rCell In rTarget
Call rCell.BorderAround(xlLineStyleNone)
Next rCell

according to the xl2000 docs, this should work ...