Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default A Borders question

Why might the following not be removing the Right border,
please?

If C.Value = SEARCHFOR Then
C.Offset(-1, -2) _
.Borders(xlEdgeRight).LineStyle = xlNone

Regards.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.522 / Virus Database: 320 - Release Date: 29/09/2003


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default A Borders question

Stuart,

This works for me

If c.Value = "SEARCHFOR" Then _
c.Offset(-1, -2) _
.Borders(xlEdgeRight).LineStyle = xlNone

that is, looking for the text SEARCHFOR, so in quotes, and a continuation
mark after Then as you have no EndIf. Also, c needs to be a range object.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Stuart" wrote in message
...
Why might the following not be removing the Right border,
please?

If C.Value = SEARCHFOR Then
C.Offset(-1, -2) _
.Borders(xlEdgeRight).LineStyle = xlNone

Regards.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.522 / Virus Database: 320 - Release Date: 29/09/2003




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default A Borders question

Didn't post with all relevent information, sorry.
I have:

Const SEARCHFOR As Variant = "£"
Dim ws As Worksheet, C As Range
and

For Each C In Intersect(Range("F:F"), ActiveSheet.UsedRange)
If C.Value = SEARCHFOR Then
C.Offset(-1, -2) _
.Borders(xlEdgeRight).LineStyle = xlNone
End If
Next

Your confirmation made me look elsewhere.....
should have been:

For Each C In Intersect(.Range ie a Full stop/Period
was missing.

Regards and thanks.


"Bob Phillips" wrote in message
...
Stuart,

This works for me

If c.Value = "SEARCHFOR" Then _
c.Offset(-1, -2) _
.Borders(xlEdgeRight).LineStyle = xlNone

that is, looking for the text SEARCHFOR, so in quotes, and a continuation
mark after Then as you have no EndIf. Also, c needs to be a range object.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Stuart" wrote in message
...
Why might the following not be removing the Right border,
please?

If C.Value = SEARCHFOR Then
C.Offset(-1, -2) _
.Borders(xlEdgeRight).LineStyle = xlNone

Regards.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.522 / Virus Database: 320 - Release Date: 29/09/2003






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.522 / Virus Database: 320 - Release Date: 29/09/2003


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default A Borders question

Well I'm glad I could help, even without knowing it <vbg

Bob

"Stuart" wrote in message
...
Didn't post with all relevent information, sorry.
I have:

Const SEARCHFOR As Variant = "£"
Dim ws As Worksheet, C As Range
and

For Each C In Intersect(Range("F:F"), ActiveSheet.UsedRange)
If C.Value = SEARCHFOR Then
C.Offset(-1, -2) _
.Borders(xlEdgeRight).LineStyle = xlNone
End If
Next

Your confirmation made me look elsewhere.....
should have been:

For Each C In Intersect(.Range ie a Full stop/Period
was missing.

Regards and thanks.


"Bob Phillips" wrote in message
...
Stuart,

This works for me

If c.Value = "SEARCHFOR" Then _
c.Offset(-1, -2) _
.Borders(xlEdgeRight).LineStyle = xlNone

that is, looking for the text SEARCHFOR, so in quotes, and a

continuation
mark after Then as you have no EndIf. Also, c needs to be a range

object.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Stuart" wrote in message
...
Why might the following not be removing the Right border,
please?

If C.Value = SEARCHFOR Then
C.Offset(-1, -2) _
.Borders(xlEdgeRight).LineStyle = xlNone

Regards.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.522 / Virus Database: 320 - Release Date: 29/09/2003






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.522 / Virus Database: 320 - Release Date: 29/09/2003




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default A Borders question

Stuart,

Keep in mind that one cells right border is the next cells left border.
Visually they look the same...

--
sb
"Stuart" wrote in message
...
Didn't post with all relevent information, sorry.
I have:

Const SEARCHFOR As Variant = "£"
Dim ws As Worksheet, C As Range
and

For Each C In Intersect(Range("F:F"), ActiveSheet.UsedRange)
If C.Value = SEARCHFOR Then
C.Offset(-1, -2) _
.Borders(xlEdgeRight).LineStyle = xlNone
End If
Next

Your confirmation made me look elsewhere.....
should have been:

For Each C In Intersect(.Range ie a Full stop/Period
was missing.

Regards and thanks.


"Bob Phillips" wrote in message
...
Stuart,

This works for me

If c.Value = "SEARCHFOR" Then _
c.Offset(-1, -2) _
.Borders(xlEdgeRight).LineStyle = xlNone

that is, looking for the text SEARCHFOR, so in quotes, and a

continuation
mark after Then as you have no EndIf. Also, c needs to be a range

object.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Stuart" wrote in message
...
Why might the following not be removing the Right border,
please?

If C.Value = SEARCHFOR Then
C.Offset(-1, -2) _
.Borders(xlEdgeRight).LineStyle = xlNone

Regards.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.522 / Virus Database: 320 - Release Date: 29/09/2003






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.522 / Virus Database: 320 - Release Date: 29/09/2003






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
Micro to do borders question. Damian Excel Discussion (Misc queries) 3 August 31st 09 05:32 PM
borders kim Excel Discussion (Misc queries) 1 October 12th 07 10:24 PM
Question about borders Paul Allor Excel Discussion (Misc queries) 3 September 14th 07 03:16 PM
borders Brush Prairie Excel Discussion (Misc queries) 0 August 23rd 05 02:57 AM
Question about Cell Borders Kevin New Users to Excel 2 April 13th 05 01:36 AM


All times are GMT +1. The time now is 01:04 AM.

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

About Us

"It's about Microsoft Excel"