Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Clear BorderAround in VBA

Jon, I'm only glad I'm able to contribute a small percentage of what you
have done, especially in charting.

--
Don Guillett
SalesAid Software

"Jon Peltier" wrote in message
...
Hi Don -

Worksheets("Sheet1").Range("A1:D4") _
.Borders.LineStyle = xlNone


Duh, I forgot that one.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Don Guillett" wrote in message
...
xl2002.all updates
I just successfully re-tested both of these. The first created ONLY an
outside border. The 2nd
one removed ALL borders. Is this what you want?

Sub bordersaround()
Worksheets("Sheet1").Range("A1:D4").BorderAround _
ColorIndex:=3, Weight:=xlThick
End Sub

Sub noborders()'remove all
Worksheets("Sheet1").Range("A1:D4") _
.Borders.LineStyle = xlNone

End Sub
this will put in interior borders.
Worksheets(1).Range("A1:d4").Borders.LineStyle = xlContinuous

--
Don Guillett
SalesAid Software

wrote in message
...
Don,

I so much appreciate your knowledge and time.

Unfortunately also does not work when the application of borders was via
Borderaround

I fairness the code I used is below: (Probably, I am doing something
wrong)

For Each MyCell In myRange
If MyCell.Borders(xlEdgeLeft).ColorIndex = 3 Then
'MyCell.BorderAround LineStyle:=xlLineStyleNone DOES
NOT WORK!!
'MyCell.Borders.LineStyle = xlNone 'DOES NOT WORK!!
MyCell.Borders(xlDiagonalDown).LineStyle = xlNone
MyCell.Borders(xlDiagonalUp).LineStyle = xlNone
MyCell.Borders(xlEdgeLeft).LineStyle = xlNone
MyCell.Borders(xlEdgeTop).LineStyle = xlNone
MyCell.Borders(xlEdgeBottom).LineStyle = xlNone
MyCell.Borders(xlEdgeRight).LineStyle = xlNone
MyCell.Borders(xlInsideVertical).LineStyle = xlNone
MyCell.Borders(xlInsideHorizontal).LineStyle = xlNone
End If
Next

EagleOne



"Don Guillett" wrote:

Don Guillett







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
Clear Button JudyP Excel Discussion (Misc queries) 2 August 5th 06 08:01 PM
excel command to clear contents except 2 formulas Lynda S Excel Discussion (Misc queries) 6 July 14th 06 03:06 PM
Using control to clear spreadsheet dvonj Excel Discussion (Misc queries) 11 March 20th 06 10:29 AM
Can't Clear Print Area GeorgeF Excel Discussion (Misc queries) 2 August 5th 05 06:10 PM
Using a Macro to clear out check box seletions Mel Excel Worksheet Functions 5 May 20th 05 08:35 PM


All times are GMT +1. The time now is 02:37 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"