Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Testing for a Border Property in Excel

Status
Not open for further replies.

dawa1234

Programmer
Oct 2, 2002
6
US
Here's what I need to do. I need to be able to test for a border property in excel using VBA. I have the top, bottom and two borders on each cell and some cells had the diagonal up and the diagonal down borders. I need to test for the diagonal borders. Any ideas?

i've tried
If Selection.Borders = xlDiaganolUp
If Selection.Borders(xlDiagonalUp) = True
but they don't work, so I know I must be missing something.

Thanks in advance.

dawa1234
 
Here's an example:

If Selection.Borders(xlDiagonalDown).LineStyle <> xlLineStyleNone Then
MsgBox &quot;Found one&quot;
End If
 
Well that seemed to do the trick.
Thanks again.


[smile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top