View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.misc
[email protected] EagleOne@discussions.microsoft.com is offline
external usenet poster
 
Posts: 391
Default Clear BorderAround in VBA

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