Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Range.BorderAround(xlLineStyleNone)

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 ...


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default Range.BorderAround(xlLineStyleNone)

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 ...



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Range.BorderAround(xlLineStyleNone)

Hi John,

This should work better:

rTarget.Borders.LineStyle = xlLineStyleNone

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"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 ...




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Range.BorderAround(xlLineStyleNone)

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 ...





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default Range.BorderAround(xlLineStyleNone)

I was referring to using a With statement for getting rid of the borders in
a range without looping through them. If you feel you know more than I do
and that my recommendations are stupid or uninformed, just do something
else. I'm sorry if you feel I've given you unsatisfactory help and I won't
bother you with any more of my attempts to help you.
Richard Choate

"John A Grandy" wrote in message
...
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 ...








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default Range.BorderAround(xlLineStyleNone)

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 ...





  #7   Report Post  
Posted to microsoft.public.excel.programming
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 ...






  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Range.BorderAround(xlLineStyleNone)

Richard, I wasn't offended and I wasn't implying you are stupid.

That's the problem with newsgroups (and especially e-mail) .... it's very
tough to interpret tone.

Imagine you're in a meeting and someone says "Huh? What does that have to do
with anything?" .... their tone & facial expressions, etc. could mean you
interpret that remark a dozen different ways.


"Richard Choate" wrote in message
...
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 ...








  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default Range.BorderAround(xlLineStyleNone)

Thanks for your comments. You are absolutely right about the tone thing. I
was communicating frequently with a potential client who writes extremely
short messages, sometimes only one word, and signs her name with an initial.
It is really easy to interpret that as curt and harsh, and it can become
that way when both parties adopt that technique. It is truly difficult to
interpret tone and I'm sorry for jumping on you prematurely.
Richard

"John A Grandy" wrote in message
...
Richard, I wasn't offended and I wasn't implying you are stupid.

That's the problem with newsgroups (and especially e-mail) .... it's very
tough to interpret tone.

Imagine you're in a meeting and someone says "Huh? What does that have to do
with anything?" .... their tone & facial expressions, etc. could mean you
interpret that remark a dozen different ways.


"Richard Choate" wrote in message
...
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 ...









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 do I enter formula sum(range+range)*0.15 sumif(range=3) tkw Excel Discussion (Misc queries) 2 October 1st 09 09:17 PM
Cond. Format Data Bars of range based on values of another range alexmo Excel Worksheet Functions 4 January 16th 09 04:03 AM
Clear BorderAround in VBA EagleOne Excel Discussion (Misc queries) 16 December 7th 06 02:16 PM
Excel Addin:Setting the range to the Excel.Range object range prop Rp007 Excel Worksheet Functions 5 November 24th 06 04:30 PM
Selecting range in list of range names depending on a cell informa Courreges Excel Discussion (Misc queries) 2 June 19th 06 10:59 AM


All times are GMT +1. The time now is 08:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"